-
Notifications
You must be signed in to change notification settings - Fork 38
30 lines (30 loc) · 984 Bytes
/
test.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
name: Test
on: [push, pull_request]
jobs:
main:
runs-on: ubuntu-latest
env:
APP_NAME: wallet
TOKEN_SWAP_URL_MAINNET: ${{ secrets.TOKEN_SWAP_URL_MAINNET }}
TOKEN_SWAP_URL_TESTNET: ${{ secrets.TOKEN_SWAP_URL_TESTNET }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install app dependencies
run: npm ci
- name: Run Commitlint
if: github.event_name == 'pull_request'
env:
HEAD: ${{ github.event.pull_request.head.sha }}
BASE: ${{ github.event.pull_request.base.sha }}
run: npx commitlint --from $BASE --to $HEAD --verbose
- run: npx cross-env NODE_ENV=production npm run lint:vue && npm run lint:css
- run: npm test