This repository was archived by the owner on May 15, 2025. It is now read-only.
fix: ensure Terraform is available for integration tests #1394
Workflow file for this run
This file contains hidden or 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: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up job | |
| uses: actions/checkout@v4 | |
| - name: Set up Terraform (replace with Coder action if possible) | |
| uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
| with: | |
| terraform_version: 1.9.8 | |
| terraform_wrapper: false | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Verify that Terraform is installed | |
| run: which terraform | |
| - name: Verify that Node.js is installed | |
| run: which node | |
| - name: Run tests | |
| run: bun test | |
| pretty: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed to get tags | |
| - uses: coder/coder/.github/actions/setup-tf@main | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Setup | |
| run: bun install | |
| - name: Format | |
| run: bun fmt:ci | |
| - name: typos-action | |
| uses: crate-ci/[email protected] | |
| - name: Lint | |
| run: bun lint | |
| - name: Check version | |
| shell: bash | |
| run: | | |
| # check for version changes | |
| ./update-version.sh | |
| # Check if any changes were made in README.md files | |
| if [[ -n "$(git status --porcelain -- '**/README.md')" ]]; then | |
| echo "Version mismatch detected. Please run ./update-version.sh and commit the updated README.md files." | |
| git diff -- '**/README.md' | |
| exit 1 | |
| else | |
| echo "No version mismatch detected. All versions are up to date." | |
| fi |