Extend PR check to test resolve-environment works with language alias
This commit is contained in:
parent
e26ed57a22
commit
f243294ab7
2 changed files with 56 additions and 12 deletions
42
.github/workflows/__resolve-environment-action.yml
generated
vendored
42
.github/workflows/__resolve-environment-action.yml
generated
vendored
|
|
@ -31,6 +31,24 @@ jobs:
|
||||||
version: stable-v2.13.4
|
version: stable-v2.13.4
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
version: stable-v2.13.4
|
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
|
name: Resolve environment
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -56,16 +74,30 @@ jobs:
|
||||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: ${{ matrix.version == 'stable-v2.13.4' && 'go' || 'go,javascript-typescript'
|
||||||
|
}}
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- uses: ./../action/resolve-environment
|
- name: Resolve environment for Go
|
||||||
id: resolve-environment
|
uses: ./../action/resolve-environment
|
||||||
|
id: resolve-environment-go
|
||||||
with:
|
with:
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
- name: Fail if no Go configuration was returned
|
- name: Fail if Go configuration missing
|
||||||
if: (!fromJSON(steps.resolve-environment.outputs.environment).configuration.go)
|
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
|
run: exit 1
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,29 @@
|
||||||
name: "Resolve environment"
|
name: "Resolve environment"
|
||||||
description: "Tests that the resolve-environment action works for Go"
|
description: "Tests that the resolve-environment action works for Go and JavaScript/TypeScript"
|
||||||
versions: ["stable-v2.13.4"]
|
versions: ["stable-v2.13.4", "default", "latest", "nightly-latest"]
|
||||||
steps:
|
steps:
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: ${{ matrix.version == 'stable-v2.13.4' && 'go' || 'go,javascript-typescript' }}
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- uses: ./../action/resolve-environment
|
- name: Resolve environment for Go
|
||||||
id: resolve-environment
|
uses: ./../action/resolve-environment
|
||||||
|
id: resolve-environment-go
|
||||||
with:
|
with:
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
- name: "Fail if no Go configuration was returned"
|
- name: Fail if Go configuration missing
|
||||||
if: (!fromJSON(steps.resolve-environment.outputs.environment).configuration.go)
|
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
|
run: exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue