-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.14 KB
/
frontend-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Frontend Tests
on:
push:
branches:
- main
jobs:
frontend-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jdx/mise-action@v2
- name: Setup package managers
run: |
npm i -g corepack
corepack enable
- name: Get dependencies from cache
id: cache-pnpm
uses: actions/cache/restore@v4
with:
path: swapify_web/node_modules
key: ${{ runner.os }}-${{ hashFiles('./swapify_web/pnpm-lock.yaml') }}
- name: Install dependencies
if: steps.cache-pnpm.outputs.cache-hit != 'true'
working-directory: ./swapify_web
run: pnpm i --frozen-lockfile
- name: Save dependencies to cache
if: steps.cache-mix.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: swapify_web/node_modules
key: ${{ runner.os }}-${{ hashFiles('./swapify_api/pnpm-lock.yaml') }}
- name: Lint
working-directory: ./swapify_web
run: pnpm run lint
- name: Typecheck
working-directory: ./swapify_web
run: pnpm run typecheck