tmpfs mounting in /tmp #1662
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: Base Tests | ||
|
Check failure on line 1 in .github/workflows/base-test.yml
|
||
| on: | ||
| workflow_call: | ||
| jobs: | ||
| test: | ||
| name: Test (${{ matrix.os }}) | ||
| runs-on: ${{ matrix.os }}-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu, macos] | ||
| env: | ||
| MISE_PROFILE: cicd | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - id: "Mount tmpfs on /tmp" | ||
| shell: bash | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| sudo mount -t tmpfs -o size=12G tmpfs /tmp | ||
| echo "Mounted tmpfs on /tmp" | ||
| df -h /tmp | ||
| - name: Use mise to install dependencies | ||
| uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3 | ||
| with: | ||
| version: 2026.1.9 | ||
| experimental: true | ||
| env: | ||
| # Adding token here to reduce the likelihood of hitting rate limit issues. | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - id: go-cache-paths | ||
| run: | | ||
| echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" | ||
| echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" | ||
| shell: bash | ||
| - name: Go Build Cache | ||
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5 | ||
| with: | ||
| path: ${{ steps.go-cache-paths.outputs.go-build }} | ||
| key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}-${{ matrix.os }}-amd64 | ||
| - name: Go Mod Cache | ||
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5 | ||
| with: | ||
| path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
| key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}-${{ matrix.os }}-amd64 | ||
| - name: Terragrunt Provider Cache | ||
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5 | ||
| with: | ||
| path: ${{ runner.os == 'Linux' && '~/.cache/terragrunt' || '~/Library/Caches/terragrunt' }} | ||
| key: ${{ runner.os }}-terragrunt-provider-cache-${{ hashFiles('**/.terraform.lock.hcl') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-terragrunt-provider-cache- | ||
| - name: Run Tests | ||
| id: run-tests | ||
| run: | | ||
| set -o pipefail | ||
| go test -v ./... -timeout 45m | tee >(go-junit-report -set-exit-code > result.xml) | ||
| shell: bash | ||
| env: | ||
| # Adding token here to reduce the likelihood of hitting rate limit issues. | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # Use shorter temp path on macOS to avoid path length issues with Git worktrees. | ||
| # Default /var/folders/.../T/ paths are too long for Git's path resolution. | ||
| TMPDIR: ${{ matrix.os == 'macos' && '/tmp' || '' }} | ||
| - name: Upload Report (${{ matrix.os }}) | ||
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | ||
| with: | ||
| name: test-report-${{ matrix.os }} | ||
| path: result.xml | ||
| - name: Display Test Results (${{ matrix.os }}) | ||
| uses: mikepenz/action-junit-report@a294a61c909bd8a4b563024a2faa28897fd53ebc # v6 | ||
| if: always() | ||
| with: | ||
| report_paths: result.xml | ||
| detailed_summary: 'true' | ||
| include_time_in_summary: 'true' | ||
| group_suite: 'true' | ||