diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cad94f4..e18d348 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,10 +73,14 @@ jobs: name: Test runs-on: ${{ matrix.os }} needs: lint + env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python }} + environment: + name: Test (${{ steps.environment.output.OS}}, ${{ steps.environment.output.PYTHON}}) + steps: - name: Checkout uses: actions/checkout@v4 @@ -97,16 +101,17 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Collect Environment + id: environment + run: | + python dev/github_env.py + - name: Install dependencies run: | python -m pip install --upgrade pip pip install poetry poetry install - - name: Collect Environment - run: | - python dev/github_env.py - - name: Test run: | poetry run pytest --verbose --numprocesses=auto --cov=. --cov-config=dev/.coveragerc --cov-report=xml diff --git a/dev/github_env.py b/dev/github_env.py index 0156f0b..cb769e0 100644 --- a/dev/github_env.py +++ b/dev/github_env.py @@ -49,6 +49,7 @@ def get_os(): return platform.platform() -with open(os.environ["GITHUB_ENV"], "a") as f: - f.write(f"PYTHON={platform.python_version()}\n") - f.write(f"OS={get_os()}\n") +for variable in ["GITHUB_ENV", "GITHUB_OUTPUT"]: + with open(os.environ[variable], "a") as f: + f.write(f"PYTHON={platform.python_version()}\n") + f.write(f"OS={get_os()}\n")