Bump actions/checkout from 4 to 5 #365
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: 'Test' | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| pull_request: | |
| branches: | |
| - 'master' | |
| workflow_dispatch: | |
| jobs: | |
| # Only checking latest Linux/UNIX on pulls to save execution times | |
| test-master-pulls: | |
| if: github.event_name == 'pull_request' | |
| runs-on: "${{ matrix.os }}" | |
| strategy: | |
| matrix: | |
| os: | |
| - 'macos-latest' | |
| - 'ubuntu-latest' | |
| steps: | |
| - uses: 'actions/checkout@v5' | |
| with: | |
| fetch-depth: 1 | |
| - name: 'Install Dependencies' | |
| run: './test/install_deps.sh' | |
| - name: 'Run all tests' | |
| run: './test/run.sh' | |
| shell: 'bash' | |
| - uses: 'docker/setup-buildx-action@v3' | |
| if: contains(matrix.os, 'ubuntu') | |
| with: | |
| install: true | |
| - uses: 'docker/build-push-action@v6' | |
| if: contains(matrix.os, 'ubuntu') | |
| with: | |
| context: . | |
| load: true | |
| tags: "tfenv-terraform:${{ github.sha }}" | |
| - name: 'Check Dockerfile' | |
| if: contains(matrix.os, 'ubuntu') | |
| run: | | |
| expect=1.2.3; | |
| got="$(docker run -e "TFENV_TERRAFORM_VERSION=${expect}" "tfenv-terraform:${{ github.sha }}" version)"; | |
| echo "${got}" | tee /dev/stderr | grep -e 'Terraform v1.2.3' | |
| # When we push to master, test everything in order to guarantee releases | |
| test-master-pushes: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| runs-on: "${{ matrix.os }}" | |
| strategy: | |
| matrix: | |
| os: | |
| - 'ubuntu-24.04' | |
| - 'ubuntu-22.04' | |
| - 'macos-14' | |
| - 'macos-13' | |
| - 'windows-2025' | |
| - 'windows-2022' | |
| steps: | |
| - uses: 'actions/checkout@v5' | |
| with: | |
| fetch-depth: 1 | |
| - name: 'Install Dependencies' | |
| run: './test/install_deps.sh' | |
| - name: 'Run all tests' | |
| run: './test/run.sh' | |
| shell: 'bash' | |
| - uses: 'docker/setup-buildx-action@v3' | |
| if: contains(matrix.os, 'ubuntu') | |
| with: | |
| install: true | |
| - uses: 'docker/build-push-action@v6' | |
| if: contains(matrix.os, 'ubuntu') | |
| with: | |
| context: . | |
| load: true | |
| tags: 'tfenv-terraform:latest' | |
| - name: 'Check Dockerfile' | |
| if: contains(matrix.os, 'ubuntu') | |
| run: | | |
| expect=1.2.3; | |
| got="$(docker run -e "TFENV_TERRAFORM_VERSION=${expect}" tfenv-terraform:latest version)"; | |
| echo "${got}" | tee /dev/stderr | grep -e 'Terraform v1.2.3' |