Fix CI for py39 removal #73
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
# once a week at midnight on Sunday | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
run-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: default | |
id: default-matrix | |
uses: ./ | |
- name: exclude latest | |
id: exclude-latest | |
uses: ./ | |
with: | |
exclude: '["3.12"]' | |
- name: exclude 2 include 1 | |
id: exclude-2-include-1 | |
uses: ./ | |
with: | |
exclude: '["3.11", "3.9"]' | |
include: '["3.13"]' | |
- name: release 2.4.3 | |
id: release-243 | |
uses: ./ | |
with: | |
release: "2.4.3" | |
- name: mda_latest | |
id: mda-latest | |
uses: ./ | |
with: | |
release: "latest" | |
- name: check outputs | |
shell: bash | |
run: | | |
echo "test 1" | |
python utils/assert_varray.py --input ${{ toJSON(steps.default-matrix.outputs.python-versions) }} --target '["3.10", "3.11", "3.12"]' | |
[[ "${{ steps.default-matrix.outputs.latest-python }}" == "3.12" ]] || exit 1 | |
[[ "${{ steps.default-matrix.outputs.stable-python }}" == "3.11" ]] || exit 1 | |
[[ "${{ steps.default-matrix.outputs.oldest-python }}" == "3.10" ]] || exit 1 | |
echo "test 2" | |
python utils/assert_varray.py --input ${{ toJSON(steps.exclude-latest.outputs.python-versions) }} --target '["3.10", "3.11"]' | |
[[ "${{ steps.exclude-latest.outputs.latest-python }}" == "3.11" ]] || exit 1 | |
[[ "${{ steps.exclude-latest.outputs.stable-python }}" == "3.10" ]] || exit 1 | |
[[ "${{ steps.exclude-latest.outputs.oldest-python }}" == "3.10" ]] || exit 1 | |
echo "test 3" | |
python utils/assert_varray.py --input ${{ toJSON(steps.exclude-2-include-1.outputs.python-versions) }} --target '["3.10", "3.12", "3.13"]' | |
[[ "${{ steps.exclude-2-include-1.outputs.latest-python }}" == "3.13" ]] || exit 1 | |
[[ "${{ steps.exclude-2-include-1.outputs.stable-python }}" == "3.12" ]] || exit 1 | |
[[ "${{ steps.exclude-2-include-1.outputs.oldest-python }}" == "3.10" ]] || exit 1 | |
echo "test 4" | |
python utils/assert_varray.py --input ${{ toJSON(steps.release-243.outputs.python-versions) }} --target '["3.8", "3.9", "3.10", "3.11"]' | |
[[ "${{ steps.release-243.outputs.latest-python }}" == "3.11" ]] || exit 1 | |
[[ "${{ steps.release-243.outputs.stable-python }}" == "3.10" ]] || exit 1 | |
[[ "${{ steps.release-243.outputs.oldest-python }}" == "3.8" ]] || exit 1 | |
echo "test 5" | |
python utils/assert_varray.py --input ${{ toJSON(steps.mda-latest.outputs.python-versions) }} --target '["3.9", "3.10", "3.11", "3.12"]' | |
python-config: | |
runs-on: ubuntu-latest | |
outputs: | |
python-matrix: ${{ steps.get-compatible-python.outputs.python-versions }} | |
stable-python: ${{ steps.get-compatible-python.outputs.stable-python }} | |
latest-python: ${{ steps.get-compatible-python.outputs.latest-python }} | |
oldest-python: ${{ steps.get-compatible-python.outputs.oldest-python }} | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: get compatible python | |
id: get-compatible-python | |
uses: MDAnalysis/mdanalysis-compatible-python@main | |
matrix-test: | |
needs: python-config | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python: ${{ fromJSON(needs.python-config.outputs.python-matrix) }} | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{matrix.python}} |