gh action

This commit is contained in:
Conner Gallagher 2022-12-15 20:01:52 -07:00
parent 7adbc7cdb6
commit fd25747d73
1 changed files with 10 additions and 6 deletions

View File

@ -30,19 +30,21 @@ jobs:
node-version: 16 node-version: 16
cache: "npm" cache: "npm"
cache-dependency-path: "javascript/solana.js/package-lock.json" cache-dependency-path: "javascript/solana.js/package-lock.json"
- name: Cache Build For Next Jobs - name: Install Dependencies
working-directory: javascript/solana.js
run: npm ci
- name: Setup Solana SDK Cache
id: cache-solana-sdk-build id: cache-solana-sdk-build
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
key: key:
${{ runner.os }}-Solana-SDK-${{ hashFiles( ${{ runner.os }}-Solana.js-${{
'javascript/solana.js/package-lock.json', hashFiles('javascript/solana.js/src/**') }}
'javascript/solana.js/src/**') }}
path: | path: |
javascript/solana.js/lib javascript/solana.js/lib
- name: Build solana.js - name: Build solana.js
working-directory: javascript/solana.js working-directory: javascript/solana.js
run: npm install && npm run build run: npm run build
job2: job2:
name: "@switchboard-xyz/solana.js Devnet Tests" name: "@switchboard-xyz/solana.js Devnet Tests"
@ -136,4 +138,6 @@ jobs:
J7nSEX8ADf3pVVicd6yKy2Skvg8iLePEmkLUisAAaioD" J7nSEX8ADf3pVVicd6yKy2Skvg8iLePEmkLUisAAaioD"
- name: Run Tests - name: Run Tests
working-directory: javascript/solana.js working-directory: javascript/solana.js
run: npm run test:localnet run:
SWITCHBOARD_PROGRAM_ID=SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f npm
run test:localnet