Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI, apply harden-runner audit.
- Loading branch information
1 parent
92ca0e7
commit c2a2e32
Showing
1 changed file
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,46 @@ | ||
--- | ||
name: CI | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches: [trunk] | ||
tags: ["*"] | ||
pull_request: | ||
branches: [trunk] | ||
workflow_dispatch: | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
PIP_DISABLE_VERSION_CHECK: "1" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
name: tox on ${{ matrix.python-version }} | ||
name: nox on ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0 | ||
with: | ||
egress-policy: audit | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: "Install dependencies" | ||
run: | | ||
python -VV | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade virtualenv tox tox-gh-actions | ||
- run: "python -m tox" | ||
python -Im site | ||
python -Im pip install --upgrade pip setuptools wheel | ||
python -Im pip install --upgrade nox | ||
python -Im nox --version | ||
- name: "Run CI suite with nox" | ||
run: "python -Im nox --non-interactive --error-on-external-run --python ${{ matrix.python-version }}" |