mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
ci: remove unimportant and complicated job filtering
This commit is contained in:
78
.github/workflows/integration-test.yaml
vendored
78
.github/workflows/integration-test.yaml
vendored
@@ -24,63 +24,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# This job is used as a workaround to a limitation when using a matrix of
|
|
||||||
# variations that a job should be executed against. The limitation is that a
|
|
||||||
# matrix once defined can't include any conditions.
|
|
||||||
#
|
|
||||||
# What this job does before our real test job with a matrix of variations run,
|
|
||||||
# is to decide on that matrix of variations a conditional logic of our choice.
|
|
||||||
#
|
|
||||||
# For more details, see this excellent stack overflow answer:
|
|
||||||
# https://stackoverflow.com/a/65434401/2220152
|
|
||||||
#
|
|
||||||
decide-on-test-jobs-to-run:
|
|
||||||
name: Decide on test jobs to run
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Currently, this logic filters out a matrix entry equaling a specific git
|
|
||||||
# reference identified by "dont_run_on_ref".
|
|
||||||
- name: Decide on test jobs to run
|
|
||||||
id: set-matrix
|
|
||||||
run: |
|
|
||||||
matrix_post_filter=$(
|
|
||||||
echo "$matrix_include_pre_filter" \
|
|
||||||
| yq e --output-format=json '.' - \
|
|
||||||
| jq -c '{"include": map( . | select(.dont_run_on_ref != "${{ github.ref }}" ))}'
|
|
||||||
)
|
|
||||||
echo "matrix=$matrix_post_filter" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
echo "The subsequent job's matrix are:"
|
|
||||||
echo $matrix_post_filter | jq -C '.'
|
|
||||||
env:
|
|
||||||
matrix_include_pre_filter: |
|
|
||||||
- name: "Debian 11, Py 3.9"
|
|
||||||
distro_image: "debian:11"
|
|
||||||
runs_on: "ubuntu-22.04"
|
|
||||||
extra_flags: ""
|
|
||||||
- name: "Ubuntu 20.04, Py 3.8"
|
|
||||||
distro_image: "ubuntu:20.04"
|
|
||||||
extra_flags: ""
|
|
||||||
- name: "Ubuntu 22.04 Py 3.10"
|
|
||||||
distro_image: "ubuntu:22.04"
|
|
||||||
extra_flags: ""
|
|
||||||
- name: "Ubuntu 22.04, Py 3.10, from main"
|
|
||||||
distro_image: "ubuntu:22.04"
|
|
||||||
extra_flags: --upgrade-from=main
|
|
||||||
- name: "Ubuntu 22.04, Py 3.10, from latest"
|
|
||||||
distro_image: "ubuntu:22.04"
|
|
||||||
extra_flags: --upgrade-from=latest
|
|
||||||
- name: "Ubuntu 22.04, Py 3.10, from 0.2.0"
|
|
||||||
distro_image: "ubuntu:22.04"
|
|
||||||
extra_flags: --upgrade-from=0.2.0
|
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
needs: decide-on-test-jobs-to-run
|
|
||||||
|
|
||||||
# integration tests run in a container,
|
# integration tests run in a container,
|
||||||
# not in the worker, so this version is not relevant to the tests
|
# not in the worker, so this version is not relevant to the tests
|
||||||
# and can be the same for all tested versions
|
# and can be the same for all tested versions
|
||||||
@@ -89,7 +33,27 @@ jobs:
|
|||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.decide-on-test-jobs-to-run.outputs.matrix) }}
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: "Debian 11, Py 3.9"
|
||||||
|
distro_image: "debian:11"
|
||||||
|
runs_on: "ubuntu-22.04"
|
||||||
|
extra_flags: ""
|
||||||
|
- name: "Ubuntu 20.04, Py 3.8"
|
||||||
|
distro_image: "ubuntu:20.04"
|
||||||
|
extra_flags: ""
|
||||||
|
- name: "Ubuntu 22.04 Py 3.10"
|
||||||
|
distro_image: "ubuntu:22.04"
|
||||||
|
extra_flags: ""
|
||||||
|
- name: "Ubuntu 22.04, Py 3.10, from main"
|
||||||
|
distro_image: "ubuntu:22.04"
|
||||||
|
extra_flags: --upgrade-from=main
|
||||||
|
- name: "Ubuntu 22.04, Py 3.10, from latest"
|
||||||
|
distro_image: "ubuntu:22.04"
|
||||||
|
extra_flags: --upgrade-from=latest
|
||||||
|
- name: "Ubuntu 22.04, Py 3.10, from 0.2.0"
|
||||||
|
distro_image: "ubuntu:22.04"
|
||||||
|
extra_flags: --upgrade-from=0.2.0
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user