Skip to content

Commit

Permalink
ci: Revamp example (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo authored May 26, 2024
2 parents ddd6287 + 62d475b commit bb52979
Show file tree
Hide file tree
Showing 15 changed files with 238 additions and 319 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
#- { platform: sparc64-unknown-linux-gnu, os: linux, runner: ubuntu-latest, run: true } # Incompatible Ring: unknown Arch

# MacOS
- { platform: aarch64-apple-darwin, os: darwin, runner: macos-latest, run: false }
- { platform: aarch64-apple-darwin, os: darwin, runner: macos-latest, run: true }
- { platform: x86_64-apple-darwin, os: darwin, runner: macos-latest, run: true }

# Windows
Expand Down Expand Up @@ -97,13 +97,19 @@ jobs:
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target.platform }}
- name: Install terraform
if: matrix.target.run
uses: hashicorp/setup-terraform@v3
- name: Setup Cache
uses: Swatinem/[email protected]
with:
shared-key: "build-${{ matrix.toolchain }}-${{ matrix.target.platform }}"
- name: Build
run: |
cargo build --all --locked
- name: Build Examples
run: |
cargo build --examples --locked
- name: Test
if: matrix.target.run
run: |
Expand All @@ -116,6 +122,20 @@ jobs:
if: contains(matrix.toolchain, 'nightly')
run: |
cargo miri test --all --locked
- name: Test Examples
if: matrix.target.run
shell: bash
run: |
rm terraform.d/bin
ln -s ../target/${{ matrix.target.platform }}/debug/examples terraform.d/bin
for d in examples/*/; do
(
cd "$d"
terraform init
terraform apply -auto-approve
terraform destroy -auto-approve
)
done
- name: Format
run: |
cargo fmt --all --check
Expand Down
Loading

0 comments on commit bb52979

Please sign in to comment.