-
Notifications
You must be signed in to change notification settings - Fork 33
60 lines (56 loc) · 1.57 KB
/
ci_ts_nonmain_on_push.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
51
52
53
54
55
56
57
58
59
60
name: Continuous Integration NPM
on:
pull_request:
paths-ignore:
- "docs/**"
- "README.md"
- "LICENSE"
- ".editorconfig"
branches:
- master
- develop
- staging
env:
MAINNET_PRC_ENDPOINT: ${{ secrets.MAINNET_RPC_ENDPOINT }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
working_dir: ./ts-client
jobs:
changed_files_ts:
runs-on: ubuntu-latest
outputs:
program: ${{steps.changed-files-specific.outputs.any_changed}}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/[email protected]
with:
files: |
ts-client
ts-test:
needs: changed_files_ts
if: needs.changed_files_ts.outputs.program == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: pnpm/[email protected]
with:
version: 6.0.2
- name: Install dependencies
working-directory: ${{ env.working_dir }}
run: pnpm install
- name: create env file
working-directory: ${{ env.working_dir }}
run: |
touch .env
echo MAINNET_RPC_ENDPOINT=${{ env.MAINNET_PRC_ENDPOINT }} >> .env
echo WALLET_PRIVATE_KEY=${{ env.WALLET_PRIVATE_KEY }} >> .env
- name: Run tests
working-directory: ${{ env.working_dir }}
run: pnpm run test