-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
73 additions
and
0 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,73 @@ | ||
name: PR Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dependencies: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: node:18 | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: dependencies | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Load node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Code passes lint check | ||
run: yarn lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: dependencies | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Load node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: All Tests pass | ||
run: yarn test |