chore(setup): run linter before building on workflows

This commit is contained in:
Karol Sójko
2022-08-05 13:54:16 +02:00
parent 10f40f662e
commit ac24256f34
3 changed files with 73 additions and 8 deletions

View File

@@ -12,27 +12,54 @@ on:
- '!*standardnotes/*web*alpha*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: ESLint
run: yarn lint
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build:web
- name: ESLint
run: yarn lint
- name: Test
run: yarn test
deploy:
needs: test
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build