Skip to content

Commit

Permalink
changed pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Attumm committed May 15, 2024
1 parent 595c46b commit da96f72
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: CI

on:
Expand All @@ -11,26 +12,20 @@ on:
permissions:
contents: read

env:
PYTHON_VERSIONS: '["3.8", "3.9", "3.10", "3.11", "3.12"]'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ${{fromJson(github.event.repository.environment.PYTHON_VERSIONS)}}
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set MAX_PYTHON_VERSION env variable
run: |
echo "MAX_PYTHON_VERSION=$(echo '${{ env.PYTHON_VERSIONS }}' | jq -r '.[-1]')" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip setuptools
Expand All @@ -46,8 +41,8 @@ jobs:
- name: Run Unit Tests
run: |
coverage run -m unittest discover
- name: Upload coverage reports to Codecov
if: env.MAX_PYTHON_VERSION == matrix.python-version
- name: Upload coverage reports to Codecov, send only once
if: matrix.python-version == '3.12'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit da96f72

Please sign in to comment.