Add Github Actions #2
Workflow file for this run
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
name: Pull Request | |
on: [pull_request] | |
jobs: | |
install: | |
name: Install dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install dependencies | |
run: npm i | |
build: | |
name: Build files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run build | |
run: npm run build | |
lint: | |
name: Apply linter | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Run linter | |
run: npm run lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run tests | |
run: npm run test |