Alternative approach to previous PR. #4
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: checks | |
on: | |
pull_request: | |
branches: | |
- dev | |
- dev/* | |
- main | |
- main/* | |
jobs: | |
run-build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
env: | |
MONGODB_URI: ${{ vars.MONGODB_URI }} | |
EMAIL_SERVER: ${{ vars.EMAIL_SERVER }} | |
EMAIL_FROM: ${{ vars.EMAIL_FROM }} | |
run-lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
# ESLint and Prettier must be in `package.json` | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Run linters | |
run: npm run format |