diff --git a/.github/workflows/__resolve-environment-action.yml b/.github/workflows/__resolve-environment-action.yml index 586795cfea..edc11a2cf2 100644 --- a/.github/workflows/__resolve-environment-action.yml +++ b/.github/workflows/__resolve-environment-action.yml @@ -31,6 +31,24 @@ jobs: version: stable-v2.13.4 - os: windows-latest version: stable-v2.13.4 + - os: ubuntu-latest + version: default + - os: macos-latest + version: default + - os: windows-latest + version: default + - os: ubuntu-latest + version: latest + - os: macos-latest + version: latest + - os: windows-latest + version: latest + - os: ubuntu-latest + version: nightly-latest + - os: macos-latest + version: nightly-latest + - os: windows-latest + version: nightly-latest name: Resolve environment permissions: contents: read @@ -56,16 +74,29 @@ jobs: run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV - uses: ./../action/init with: - languages: go + languages: go,javascript-typescript tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/resolve-environment - id: resolve-environment + - name: Resolve environment for Go + uses: ./../action/resolve-environment + id: resolve-environment-go with: language: go - - name: Fail if no Go configuration was returned - if: (!fromJSON(steps.resolve-environment.outputs.environment).configuration.go) + - name: Fail if Go configuration missing + if: (!fromJSON(steps.resolve-environment-go.outputs.environment).configuration.go) + run: exit 1 + + - name: Resolve environment for JavaScript/TypeScript + if: matrix.version != 'stable-v2.13.4' + uses: ./../action/resolve-environment + id: resolve-environment-js + with: + language: javascript-typescript + + - name: Fail if JavaScript/TypeScript configuration present + if: matrix.version != 'stable-v2.13.4' && + fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript run: exit 1 env: CODEQL_ACTION_TEST_MODE: true diff --git a/pr-checks/checks/resolve-environment-action.yml b/pr-checks/checks/resolve-environment-action.yml index 53566e5031..f59cf1ef64 100644 --- a/pr-checks/checks/resolve-environment-action.yml +++ b/pr-checks/checks/resolve-environment-action.yml @@ -1,17 +1,29 @@ name: "Resolve environment" -description: "Tests that the resolve-environment action works for Go" -versions: ["stable-v2.13.4"] +description: "Tests that the resolve-environment action works for Go and JavaScript/TypeScript" +versions: ["stable-v2.13.4", "default", "latest", "nightly-latest"] steps: - uses: ./../action/init with: - languages: go + languages: go,javascript-typescript tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/resolve-environment - id: resolve-environment + - name: Resolve environment for Go + uses: ./../action/resolve-environment + id: resolve-environment-go with: language: go - - name: "Fail if no Go configuration was returned" - if: (!fromJSON(steps.resolve-environment.outputs.environment).configuration.go) + - name: Fail if Go configuration missing + if: (!fromJSON(steps.resolve-environment-go.outputs.environment).configuration.go) + run: exit 1 + + - name: Resolve environment for JavaScript/TypeScript + if: matrix.version != 'stable-v2.13.4' + uses: ./../action/resolve-environment + id: resolve-environment-js + with: + language: javascript-typescript + + - name: Fail if JavaScript/TypeScript configuration present + if: matrix.version != 'stable-v2.13.4' && fromJSON(steps.resolve-environment-js.outputs.environment).configuration.javascript run: exit 1