|
1 | 1 | name: CI |
2 | 2 |
|
3 | | -on: [push,pull_request] |
| 3 | +on: [push, pull_request] |
4 | 4 |
|
5 | 5 | jobs: |
6 | 6 | tests: |
7 | | - name: "Python ${{ matrix.python-version }}" |
| 7 | + name: "Tests (${{ matrix.os }})" |
8 | 8 | runs-on: ${{ matrix.os }} |
9 | 9 |
|
10 | | - defaults: |
11 | | - run: |
12 | | - shell: bash -el {0} |
13 | | - |
14 | 10 | strategy: |
15 | 11 | matrix: |
16 | | - os: [macos-latest, ubuntu-latest] #macos-latest/macos-14 is M1 - some deps fail it due to not having M1 build (MMSeqs2) |
17 | | - python-version: ["3.12"] |
| 12 | + os: [macos-latest, ubuntu-latest] |
18 | 13 |
|
19 | 14 | steps: |
20 | | - - uses: "actions/checkout@v3" |
| 15 | + - uses: actions/checkout@v4 |
21 | 16 | with: |
22 | 17 | fetch-depth: 0 |
23 | 18 |
|
24 | | - # Setup env |
25 | | - - uses: "conda-incubator/setup-miniconda@v3" |
| 19 | + - name: Setup Pixi |
| 20 | + uses: prefix-dev/setup-pixi@v0.8.1 |
26 | 21 | with: |
27 | | - activate-environment: plassembler |
28 | | - environment-file: build/environment.yaml |
29 | | - python-version: ${{ matrix.python-version }} |
30 | | - auto-activate-base: false |
31 | | - channels: conda-forge,bioconda,defaults |
32 | | - channel-priority: strict |
33 | | - auto-update-conda: true |
34 | | - |
35 | | - - name: Install plassembler |
36 | | - shell: bash -l {0} |
37 | | - run: | |
38 | | - conda install python=${{ matrix.python-version }} |
39 | | - python -m pip install --upgrade pip |
40 | | - pip install -e . |
41 | | - pip install black |
42 | | - pip install isort |
43 | | - pip install pytest |
44 | | - pip install pytest-cov |
45 | | - pip install git+https://github.com/rrwick/Unicycler.git |
46 | | - unicycler --help |
47 | | - - name: Check formatting |
48 | | - shell: bash -l {0} |
49 | | - run: just check-fmt |
50 | | - - name: Test and generate coverage report with pytest |
51 | | - shell: bash -l {0} |
52 | | - # need to set TERM to linux for some reason,kept getting a nasty error that was breaking unicycler |
| 22 | + pixi-version: v0.71.2 |
| 23 | + cache: true |
| 24 | + environments: dev |
| 25 | + |
| 26 | + - name: Check formatting and lint |
| 27 | + run: pixi run check-fmt |
| 28 | + |
| 29 | + - name: Run unit tests |
| 30 | + # TERM is set to avoid tput/terminal noise breaking Unicycler |
53 | 31 | # https://github.com/cypress-io/cypress/issues/15679 |
54 | | - run: | |
55 | | - export TERM=linux |
56 | | - unicycler --version |
57 | | - just test-ci |
| 32 | + env: |
| 33 | + TERM: linux |
| 34 | + run: pixi run test-ci |
58 | 35 |
|
| 36 | + - name: Upload coverage reports to Codecov |
| 37 | + uses: codecov/codecov-action@v4 |
0 commit comments