-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate 3.10; test workflow to pixi; project toml merge
- Loading branch information
Showing
4 changed files
with
90 additions
and
158 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
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 |
---|---|---|
|
@@ -28,14 +28,14 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
python-version: ["311", "312", "313"] | ||
include: | ||
- os: ubuntu-latest | ||
label: linux-64 | ||
prefix: /home/runner/miniconda3/envs/fiat_test | ||
|
||
name: ${{ matrix.label }} - py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ matrix.python-version }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -44,52 +44,25 @@ jobs: | |
- name: Check-out source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Generate env yaml | ||
run: pip install tomli && python make_env.py test -p ${{ matrix.python-version }}.* | ||
|
||
- name: load from cache | ||
id: cache | ||
uses: actions/cache/restore@v4 | ||
- name: Setup pixi env | ||
uses: prefix-dev/[email protected] | ||
with: | ||
path: | | ||
/home/runner/miniconda3 | ||
~/pycache | ||
# the below two settings mean we'll alway srestore the cache | ||
# but the cache hit output can tell us if we have to update afterwards | ||
key: test-py${{ matrix.python-version }}-${{ hashFiles('environment.yml') }} | ||
restore-keys: | | ||
test-py${{ matrix.python-version }} | ||
- name: Fail on no cache restore | ||
if: steps.cache.outputs.cache-matched-key == '' | ||
run: | | ||
echo "Failed to restore any cache. exiting..." | ||
exit 1 | ||
- name: Update environment | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
export PATH=/home/runner/miniconda3/bin:$PATH | ||
mamba env update -n fiat_test -f environment.yml | ||
- name: Conda info | ||
run: | | ||
export PATH=/home/runner/miniconda3/bin:$PATH | ||
conda info | ||
conda list -n fiat_test | ||
pixi-version: "v0.39.4" | ||
environments: test-py${{ matrix.python-version }} | ||
locked: false | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
|
||
- name: Create testdata | ||
run: | | ||
export PATH=/home/runner/miniconda3/bin:$PATH | ||
mamba run -n fiat_test python .testdata/create_test_data.py | ||
pixi run -e test-py${{ matrix.python-version }} generate-data | ||
- name: Test | ||
run: | | ||
export PATH=/home/runner/miniconda3/bin:$PATH | ||
mamba run -n fiat_test python -m pytest --verbose --cov=fiat --cov-report xml | ||
pixi run -e test-py${{ matrix.python-version }} test-cov | ||
- name: Upload coverage to codecov.io | ||
if: matrix.python-version == '3.12' | ||
if: matrix.python-version == '313' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./coverage.xml | ||
|
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