Skip to content

Commit

Permalink
test: Improvements to CI Workflow (#2437)
Browse files Browse the repository at this point in the history
### Changes

This pull request updates the continuous integration workflow
`test.yml`:

- Refine concurrency group specificity to improve efficiency. This
cancels in-progress test runs when changes are committed to a pull
request.
- Rename the test's `Run` step to `Build Package` for clarity to aid in
filtering branch protection rules.
- Update checkout step to use `github.event.pull_request.head.sha` for
`pull_request_target` (and `github.ref` for non-PR triggering events).
- Hardcode `node-version` to 18 rather than use an environment variable.

### References

Updates based on internal feedback and conversations.

### Testing

This pull request applies improvements to the continuous integration
testing for the repository but does not add any additional tests.

### Checklist

* [x] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
* [x] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
* [x] All code quality tools/guidelines have been run/followed
* [x] All relevant assets have been compiled
  • Loading branch information
evansims authored Aug 28, 2023
1 parent d93d513 commit 7a6ddd3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
Expand All @@ -29,17 +29,19 @@ jobs:
run:
needs: authorize # Require approval before running on forked pull requests

name: Run
name: Build Package
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
node-version: 18
cache: 'npm'

- name: Install dependencies
Expand Down

0 comments on commit 7a6ddd3

Please sign in to comment.