Skip to content

Use pixi (attempt 2) #2

Use pixi (attempt 2)

Use pixi (attempt 2) #2

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
strategy:

Check failure on line 9 in .github/workflows/unit-test.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/unit-test.yml (Line: 9, Col: 1): Unexpected value 'strategy'
fail-fast: false
matrix:
python-version: ["py310", "py311", "py312"]
jobs:
doctest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Test
run: |
pixi run --locked --environment test-all-${{ matrix.python-version }} \
pytest -v ecoscope_workflows/ --doctest-modules --ignore=ecoscope_workflows/visualize.py
test-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Test
run: | # todo: move end-to-end tests to examples build dirs and remove `-k` flag
pixi run --locked --environment test-all-${{ matrix.python-version }} \
pytest -v tests --ignore tests/tasks -k "not test_end_to_end"
test-tasks-not-io:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Test
run: pixi run --locked --environment test-all-${{ matrix.python-version }} pytest -v tests/tasks -m "not io"
test-tasks-io:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Test
env:
EARTHRANGER_SERVER: ${{ secrets.EARTHRANGER_SERVER }}
EARTHRANGER_USERNAME: ${{ secrets.EARTHRANGER_USERNAME }}
EARTHRANGER_PASSWORD: ${{ secrets.EARTHRANGER_PASSWORD }}
run: pixi run --locked --environment test-all-${{ matrix.python-version }} pytest -v tests/tasks -m "io"
test-e2e: # todo: move end-to-end tests to examples build dirs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Test
run: |
pixi run --locked --environment test-all-${{ matrix.python-version }} \
pytest -v tests/test_examples.py -k "end_to_end"