Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip fan-out of acceptance tests on PRs #243

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- main
paths-ignore:
- "README.md"
# TODO - periodically run on a cron to detect API drift.
# schedule:
# - cron: '0 13 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -21,6 +18,8 @@ jobs:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
matrix: ${{ steps.set-matrix.outputs.result }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -40,6 +39,20 @@ jobs:
run: task build
- name: Format
run: task lint
- uses: actions/github-script@v7
id: set-matrix
with:
script: |
return {
m: context.eventName === 'push' ? [
{ os: "ubuntu-latest", terraform: "1.10.*" },
{ os: "ubuntu-latest", terraform: "1.4.*" },
{ os: "windows-latest", terraform: "1.10.*" }
] : [
{ os: "ubuntu-latest", terraform: "1.10.*" }
]
};
result-encoding: json

docs:
name: Docs Test
Expand Down Expand Up @@ -72,11 +85,7 @@ jobs:
strategy:
max-parallel: 1
fail-fast: false
matrix:
m:
- { os: "ubuntu-latest", terraform: "1.9.*" }
- { os: "ubuntu-latest", terraform: "1.4.*" }
- { os: "windows-latest", terraform: "1.9.*" }
matrix: ${{ fromJson(needs.build.outputs.matrix) }}
runs-on: ${{ matrix.m.os }}
steps:
- name: Checkout code
Expand Down
Loading