diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f171c0b..d156eb4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,13 @@ on: pull_request: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest @@ -15,7 +22,7 @@ jobs: python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -23,9 +30,10 @@ jobs: - name: Install poetry run: | - pip install -U pip - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - - echo "${HOME}/.poetry/bin" >> $GITHUB_PATH + curl -sSL "https://install.python-poetry.org" | python + + # Adding `poetry` to `$PATH`: + echo "$HOME/.poetry/bin" >> $GITHUB_PATH - name: Install dependencies run: | @@ -40,10 +48,9 @@ jobs: poetry run pytest poetry check poetry run pip check - poetry run safety check --full-report - name: Upload coverage to Codecov - if: matrix.python-version == 3.8 + if: matrix.python-version == 3.11 uses: codecov/codecov-action@v3 with: file: ./coverage.xml