4fd0ce7c29
- Run test on pull requests to the main branch instead of on every push - Cancel in-progress workflows if a PR is updated (i.e., a new commit is pushed) and the same workflows are triggered to run again - Rename step ID from `demo` to `test` --------- Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
32 lines
811 B
YAML
32 lines
811 B
YAML
name: test
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16.16"
|
|
cache: "npm"
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- uses: ./ # Uses the action in the root directory
|
|
id: test
|
|
with:
|
|
app_id: ${{ vars.TEST_APP_ID }}
|
|
private_key: ${{ secrets.TEST_APP_PRIVATE_KEY }}
|
|
- uses: octokit/request-action@v2.x
|
|
id: get-repository
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.test.outputs.token }}
|
|
with:
|
|
route: GET /installation/repositories
|
|
- run: echo '${{ steps.get-repository.outputs.data }}'
|