-
Notifications
You must be signed in to change notification settings - Fork 173
ci(test): run on pull request and add concurrency configuration #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
22441d5
bd64bda
de62487
b07e73d
3c0003f
e1bbf58
7b8f1be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,11 @@ | ||||||||||||||||
| name: test | ||||||||||||||||
| on: [push] | ||||||||||||||||
| on: | ||||||||||||||||
| pull_request: | ||||||||||||||||
| branches: [main] | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd still keep this part
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed it because pull request checks run in the context of the merge commit, so running on push to main is redundant. Is there another use case you have in mind?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I always thought that the push to main builds and the pull requests builds were slightly different but maybe this is no longer the case. The other reason is if we want to add a badge showing that the CI passes, not sure if we could show a badge if we don't run test builds on the main branch? |
||||||||||||||||
|
|
||||||||||||||||
| concurrency: | ||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||
|
|
||||||||||||||||
| jobs: | ||||||||||||||||
| test: | ||||||||||||||||
|
|
@@ -13,14 +19,14 @@ jobs: | |||||||||||||||
| - run: npm ci | ||||||||||||||||
| - run: npm run build | ||||||||||||||||
| - uses: ./ # Uses the action in the root directory | ||||||||||||||||
| id: demo | ||||||||||||||||
| 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.demo.outputs.token }} | ||||||||||||||||
| GITHUB_TOKEN: ${{ steps.test.outputs.token }} | ||||||||||||||||
| with: | ||||||||||||||||
| route: GET /installation/repositories | ||||||||||||||||
| - run: echo '${{ steps.get-repository.outputs.data }}' | ||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.