forked from metaplex-foundation/metaplex-program-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
47 lines (40 loc) · 1.31 KB
/
action.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
name: Yarn Install Build Test and Lint
inputs:
cache_id:
description: ID to use in order to cache yarn install
required: true
working_dir:
description: Directory in which to perform the yarn tasks
required: true
skip_test:
description: If true, testing is skipped. This should be used when the tests are end-to-end and thus need a locally running test-validator with deployed Rust programs.
required: true
description: Installs JS deps and builds the JS package, ensuring the code is valid
runs:
using: composite
steps:
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ inputs.cache_id }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
if: ${{ env.CACHE == 'true' }}
##############
# Verify Contract
##############
- name: Install modules
run: yarn install
working-directory: ${{ inputs.working_dir }}
shell: bash
- name: Build TypeScript
run: yarn build
working-directory: ${{ inputs.working_dir }}
shell: bash
- name: Test TypeScript
if: inputs.skip_test == 'false'
run: yarn test
working-directory: ${{ inputs.working_dir }}
shell: bash
- name: Lint TypeScript
run: yarn lint
working-directory: ${{ inputs.working_dir }}
shell: bash