CI #83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # trigger | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| # run Monday and Thursday at 03:14 UTC | |
| - cron: '14 3 * * MON' | |
| # jobs | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11'] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Prepare python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache | |
| key: ${{ runner.os }}-${{ matrix.python-version }}-ci-base | |
| - name: pip install tox | |
| run: pip install tox | |
| - name: Run base tests | |
| timeout-minutes: 15 | |
| run: tox -e base | |
| - name: Coverage | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml | |
| style: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Prepare python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache | |
| key: ${{ runner.os }}-${{ matrix.python-version }}-ci-base | |
| - name: pip install tox | |
| run: pip install tox | |
| - name: Run flake8 to test code style | |
| timeout-minutes: 5 | |
| run: tox -e flake8 |