From 1ae57183d800d8bf39f213afcee6d72ef098b459 Mon Sep 17 00:00:00 2001 From: Alex Morling Date: Mon, 2 Dec 2024 19:23:24 +0200 Subject: [PATCH] rework os level tests --- .github/workflows/io_tests.yaml | 5 +---- .github/workflows/main.yml | 2 +- .github/workflows/test_all.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/tests.yml | 13 +++++++------ 4 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test_all.yaml diff --git a/.github/workflows/io_tests.yaml b/.github/workflows/io_tests.yaml index 60489f23..899ae06b 100644 --- a/.github/workflows/io_tests.yaml +++ b/.github/workflows/io_tests.yaml @@ -1,10 +1,6 @@ name: Test IO on: - schedule: - # Per https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule - # Make this a weird time - - cron: "23 5 * * 1" push: branches: [ "master" ] pull_request: @@ -21,4 +17,5 @@ jobs: uses: ./.github/workflows/tests.yml with: io: "io" + os: "ubuntu-latest" secrets: inherit \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 953181b8..63585078 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,4 +11,4 @@ jobs: uses: ./.github/workflows/tests.yml with: io: "not io" - secrets: inherit \ No newline at end of file + os: "ubuntu-latest" \ No newline at end of file diff --git a/.github/workflows/test_all.yaml b/.github/workflows/test_all.yaml new file mode 100644 index 00000000..47003ba4 --- /dev/null +++ b/.github/workflows/test_all.yaml @@ -0,0 +1,26 @@ +name: Test Everything + +on: + schedule: + # Per https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule + # Make this a weird time + - cron: "23 5 * * *" + workflow_dispatch: {} + + +jobs: + ubuntu: + uses: ./.github/workflows/tests.yml + with: + io: "io or not io" + os: "ubuntu-latest" + mac: + uses: ./.github/workflows/tests.yml + with: + io: "io or not io" + os: "macos-latest" + windows: + uses: ./.github/workflows/tests.yml + with: + io: "io or not io" + os: "windows-latest" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a616e1ba..878a3636 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,19 +6,20 @@ on: io: type: string required: true + inputs: + os: + type: string + required: true jobs: Test: - name: ${{ matrix.os }}, ${{ matrix.env }} - runs-on: ${{ matrix.os }} + name: ${{ inputs.os }}, ${{ inputs.io }} + runs-on: ${{ inputs.os }} defaults: run: shell: bash -leo pipefail {0} strategy: fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - env: [environment.yml] steps: - uses: actions/checkout@v4 @@ -26,7 +27,7 @@ jobs: - name: Setup Micromamba uses: mamba-org/setup-micromamba@v2.0.2 with: - environment-file: ${{ matrix.env }} + environment-file: ${{ environment.yml }} cache-environment: true init-shell: bash powershell