Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Oct 30, 2024
1 parent f74bea3 commit d23a2fa
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Setup Python 3.8
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT # - name: Cache
shell: bash
- name: Cache PyPI
uses: actions/cache@v4.1.2
uses: actions/cache@v4
with:
key: pip-lint-${{ hashFiles('requirements.txt') }}
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}
restore-keys: |
pip-lint-
- name: Install dependencies
Expand All @@ -46,23 +51,24 @@ jobs:
needs: [lint]
strategy:
matrix:
pyver: ['3.8', '3.9', '3.10']
pyver: ['3.9', '3.10', '3.11', '3.12', '3.13']
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.pyver }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyver }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)" # - name: Cache
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT # - name: Cache
shell: bash
- name: Cache PyPI
uses: actions/cache@v4.1.2
uses: actions/cache@v4
with:
key: pip-ci-${{ matrix.pyver }}-${{ hashFiles('requirements.txt') }}
path: ${{ steps.pip-cache.outputs.dir }}
Expand All @@ -77,21 +83,22 @@ jobs:
make test
python -m coverage xml
- name: Upload coverage
uses: codecov/codecov-action@v4.6.0
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unit
fail_ci_if_error: false

test-summary:
name: Test matrix status
if: always()
needs: [lint, unit]
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Placeholder
run: |
true
- name: Test matrix status
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

deploy:
name: Deploy
Expand All @@ -101,8 +108,8 @@ jobs:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Setup Python 3.8
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- name: Install dependencies
run:
Expand Down

0 comments on commit d23a2fa

Please sign in to comment.