cc6f999683
This pull request makes minor updates to the GitHub Actions workflow configuration in `.github/workflows/test.yml`, focusing on standardizing job naming and adding support for merge group events. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: test
|
||
|
||
on:
|
||
push:
|
||
branches:
|
||
- main
|
||
pull_request:
|
||
merge_group:
|
||
workflow_dispatch:
|
||
|
||
concurrency:
|
||
group: ${{ github.workflow }}-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
jobs:
|
||
integration:
|
||
name: integration
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v6
|
||
|
||
- uses: actions/setup-node@v6
|
||
with:
|
||
node-version-file: package.json
|
||
|
||
- run: npm ci
|
||
- run: npm test
|
||
|
||
end-to-end:
|
||
name: end-to-end
|
||
runs-on: ubuntu-latest
|
||
# do not run from forks, as forks don’t have access to repository secrets
|
||
if: github.event_name == 'merge_group' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||
steps:
|
||
- uses: actions/checkout@v6
|
||
- uses: actions/setup-node@v6
|
||
with:
|
||
node-version-file: package.json
|
||
- 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 }}'
|