Update CI configuration.

This commit is contained in:
arp102 2023-09-12 13:17:49 -04:00
parent 400c29bc4f
commit cae5747a19
1 changed files with 34 additions and 24 deletions

View File

@ -1,41 +1,51 @@
name: "tox.yml" name: tox
on: on:
push: push:
branches: [ master ] branches: [ master ]
pull_request: pull_request:
branches: [ master ]
jobs: jobs:
build: tox-test:
strategy:
matrix:
os: [ubuntu-latest]
python:
- {version: '3.8', env: py38}
- {version: '3.9', env: py39}
- {version: '3.10', env: py310}
- {version: '3.11', env: py311}
test_mode: [0, 1]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
TOXENV: ${{ matrix.test }} TOXENV: ${{ matrix.python.env }}
RUN_INTEGRATION_TESTS: ${{ matrix.test_number}} RUN_INTEGRATION_TESTS: ${{ matrix.test_mode }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: pip install "tox" - uses: actions/setup-python@v4
- run: pip install bandit with:
python-version: ${{ matrix.python.version }}
- run: pip install tox
- run: pip install codecov - run: pip install codecov
- run: pip install slugs - run: pip install slugs
- run: sudo chmod -R 777 /usr/local/lib/
- run: python3 setup.py install - run: python3 setup.py install
- run: ./.travis/run.sh - run: ./.travis/run.sh
- run: codecov - run: codecov
tox-other:
strategy: strategy:
matrix: matrix:
test: ["pep8", "bandit", "docs"] os: [ubuntu-latest]
os: [ubuntu-22.04,ubuntu-20.04] python: ['3.8', '3.9', '3.10', '3.11']
include: test: [pep8, bandit, docs]
- test: "py38" runs-on: ${{ matrix.os }}
test_number: "0" env:
os: ubuntu-20.04 TOXENV: ${{ matrix.test }}
- test: "py38" steps:
test_number: "1" - uses: actions/checkout@v3
os: ubuntu-20.04 - uses: actions/setup-python@v4
- test: "py310" with:
test_number: "0" python-version: ${{ matrix.python }}
os: ubuntu-22.04 - run: pip install tox
- test: "py310" - run: pip install bandit
test_number: "1" if: ${{ matrix.test == 'bandit' }}
os: ubuntu-22.04 - run: tox