Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: test
on: [push]
on:
pull_request:
branches: [main]
Comment thread
parkerbxyz marked this conversation as resolved.
Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still keep this part

Suggested change
on:
pull_request:
branches: [main]
push:
branches:
- main
pull_request: {}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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:
Expand All @@ -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 }}'