-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (47 loc) · 1.4 KB
/
packages-staking.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
46
47
48
49
50
name: packages/staking
# Triggering this workflow:
# 1. Push to main/release branch
# 2. Pushing to Pull Request with "staking" label
# 3. Adding "staking" label to Pull Request
on:
pull_request:
push:
branches:
- 'main'
- 'release/**'
jobs:
build_staking:
name: Build Staking Center
runs-on: self-hosted
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'yarn'
- name: Node modules cache
uses: actions/cache@v4
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable --inline-builds
- name: Check for linter issues
run: yarn workspace @lace/staking lint:all
- name: Build dependencies of Staking Center
run: yarn staking build-deps
- name: Run tests
run: yarn workspace @lace/staking test:unit
- name: Build Staking dist
env:
NODE_OPTIONS: '--max_old_space_size=8192'
run: yarn workspace @lace/staking build