Skip to content

Commit

Permalink
Use tox for "downstream" normal CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Jan 3, 2023
1 parent e4e234f commit ebba8a1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 49 deletions.
60 changes: 11 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ jobs:
python-version: 3.8
coverage: codecov

asdf-schemas:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
submodules: false
# Any env name which does not start with `pyXY` will use this Python version.
default_python: '3.10'
envs: |
- linux: asdf-standard
- linux: asdf-transform-schemas
- linux: asdf-unit-schemas
test:
needs: [core, asdf-schemas]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
Expand Down Expand Up @@ -78,52 +89,3 @@ jobs:
upload_to_anaconda: false
test_extras: tests
test_command: pytest --pyargs asdf

asdf-schemas:
name: ${{ matrix.package_name }} tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package_name: asdf-standard
repository: asdf-format/asdf-standard
ref: master
install_command: pip install -e .[test]
test_command: pytest
- package_name: asdf-transform-schemas
repository: asdf-format/asdf-transform-schemas
ref: master
install_command: pip install -e .[test]
test_command: pytest
- package_name: asdf-unit-schemas
repository: asdf-format/asdf-unit-schemas
ref: main
install_command: pip install -e .[test]
test_command: pytest
steps:
- name: Checkout asdf
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
path: asdf
- name: Checkout ${{ matrix.package_name }}
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: ${{ matrix.repository }}
ref: ${{ matrix.ref }}
path: target
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install asdf
run: cd asdf && pip install .
- name: Install remaining ${{ matrix.package_name }} dependencies
run: cd target && ${{ matrix.install_command }}
- name: Pip Freeze
run: pip freeze
- name: Run ${{ matrix.package_name}} tests
run: cd target && ${{ matrix.test_command }}
39 changes: 39 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,42 @@ extras= all,tests
commands=
pip freeze
pytest compatibility_tests/ --remote-data

[testenv:asdf-standard]
changedir={envtmpdir}
allowlist_externals=
git
extras= all,tests
commands=
git clone https://github.com/asdf-format/asdf-standard.git
pip install -e asdf-standard[test]

pip freeze

pytest asdf-standard

[testenv:asdf-transform-schemas]
changedir={envtmpdir}
allowlist_externals=
git
extras= all,tests
commands=
git clone https://github.com/asdf-format/asdf-transform-schemas.git
pip install -e asdf-transform-schemas[test]

pip freeze

pytest asdf-transform-schemas

[testenv:asdf-unit-schemas]
changedir={envtmpdir}
allowlist_externals=
git
extras= all,tests
commands=
git clone https://github.com/asdf-format/asdf-unit-schemas.git
pip install -e asdf-unit-schemas[test]

pip freeze

pytest asdf-unit-schemas

0 comments on commit ebba8a1

Please sign in to comment.