| name: Experimental Engine | |
| on: | |
| pull_request: | |
| paths: | |
| - 'internal/engine/**' | |
| - 'internal/lang/**' | |
| - 'internal/resources/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| exp-eng-tests: | |
| name: Unit tests in the experimental engine for ${{ matrix.goos }}_${{ matrix.goarch }} | |
| runs-on: ${{ matrix.runson }} | |
| env: | |
| TF_APPEND_USER_AGENT: Integration-Test | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| strategy: | |
| matrix: | |
| include: | |
| - { runson: ubuntu-latest, goos: linux, goarch: "amd64" } | |
| fail-fast: false | |
| steps: | |
| # 👇🏾 GH actions supports only "AMD64 arch", so we are using this action | |
| # for testing on non amd64 envs like 386, arm64 etc... | |
| - name: "Set up QEMU" | |
| if: matrix.goos == 'linux' && matrix.goarch != 'amd64' && matrix.goarch != 'arm64' | |
| uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0 | |
| - name: "Fetch source code" | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Install Go toolchain | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: "Unit tests" | |
| run: | | |
| TOFU_X_EXPERIMENTAL_RUNTIME=1 go test -v -ldflags "-X main.experimentsAllowed=yes" ./internal/tofu |