-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (36 loc) · 1020 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
31
32
33
34
35
36
37
38
39
name: Test getUserTVLByBlock method
on:
pull_request:
paths:
- '**/' # Listen for changes in any directory
jobs:
test:
runs-on: ubuntu-latest
env:
FOLDER_NAME: ""
steps:
- uses: actions/[email protected]
- uses: jitterbit/get-changed-files@v1
id: abc
with:
format: space-delimited
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract folder name
run: |
added="${{ steps.abc.outputs.added }}"
folder=$(echo "$added" | awk -F/ '{print $2}' | sort -u)
echo "FOLDER_NAME=$folder" >> $GITHUB_ENV
- name: Print folder name
run: |
echo "Folder name: $FOLDER_NAME"
- name: Checkout PR
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run command from protocol folder
run: |
cd adapters
cd $FOLDER_NAME
npm install
tsc
npm run start