-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
116 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Test | ||
|
||
# Prevent pull requests trigger duplicate checks for both [push] and [pull_request] | ||
# @see https://github.com/orgs/community/discussions/26940 | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' #avoid duplicates: only run the PR, not the push | ||
- 'gh-pages' #github pages do not trigger all tests | ||
tags-ignore: | ||
- 'v*' #avoid rerun existing commit on release | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | ||
with: | ||
node-version: '18' | ||
|
||
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/ | ||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | ||
id: cache | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install packages | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Run postinstall | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: npm run --if-present postinstall && npm rebuild && npm run prepare --if-present | ||
|
||
- name: Test | ||
run: sudo npx playwright install-deps && npm run test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Lint | ||
|
||
# Prevent pull requests trigger duplicate checks for both [push] and [pull_request] | ||
# @see https://github.com/orgs/community/discussions/26940 | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' #avoid duplicates: only run the PR, not the push | ||
- 'gh-pages' #github pages do not trigger all tests | ||
tags-ignore: | ||
- 'v*' #avoid rerun existing commit on release | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | ||
with: | ||
node-version: '18' | ||
|
||
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/ | ||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | ||
id: cache | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install packages | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Run postinstall | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: npm run --if-present postinstall && npm rebuild && npm run prepare --if-present | ||
|
||
- name: Lint | ||
run: npm run lint |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters