mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 16:16:21 +00:00
Update actions/checkout, actions/setup-node, actions/cache, and actions/upload-artifact from v2 to v3. Signed-off-by: Austin Vazquez <macedonv@amazon.com>
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: Integration
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test-return:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- id: output-set
|
|
uses: ./
|
|
with:
|
|
script: return core.getInput('input-value')
|
|
result-encoding: string
|
|
input-value: output
|
|
- run: |
|
|
if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
test-relative-require:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- id: output-set
|
|
uses: ./
|
|
with:
|
|
script: return require('./package.json').name
|
|
result-encoding: string
|
|
input-value: output
|
|
- run: |
|
|
if [[ "${{steps.output-set.outputs.result}}" != "github-script" ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
test-npm-require:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
|
restore-keys: ${{runner.os}}-npm-
|
|
- run: npm ci
|
|
- id: output-set
|
|
uses: ./
|
|
with:
|
|
script: return require('@actions/core/package.json').name
|
|
result-encoding: string
|
|
input-value: output
|
|
- run: |
|
|
if [[ "${{steps.output-set.outputs.result}}" != "@actions/core" ]]; then
|
|
exit 1
|
|
fi
|