gh action update

This commit is contained in:
Conner Gallagher 2022-12-15 19:20:22 -07:00
parent 92775744b7
commit dc0d96cac9
1 changed files with 86 additions and 2 deletions

View File

@ -16,7 +16,8 @@ env:
SOLANA_VERSION: 1.13.5
jobs:
solana_js_devnet_test:
job1:
name: Build @switchboard-xyz/solana.js
runs-on: ubuntu-latest
defaults:
run:
@ -24,19 +25,57 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "javascript/solana.js/package-lock.json"
- name: Cache Build For Next Jobs
id: cache-solana.js-install
uses: actions/cache@v3
with:
key:
${{ runner.os }}-Solana.js-${{
hashFiles('javascript/solana.js/src/**') }}
path: |
javascript/solana.js/lib
- name: Build solana.js
working-directory: javascript/solana.js
run: npm install && npm run build
job2:
name: "@switchboard-xyz/solana.js Devnet Tests"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Cache Build For Next Jobs
id: cache-solana.js-install
uses: actions/cache@v3
with:
key:
${{ runner.os }}-Solana.js-${{
hashFiles('javascript/solana.js/src/**') }}
path: |
javascript/solana.js/lib
- name: Use Node.js
if: steps.cache-solana.js-install.outputs.cache-hit != 'true'
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Build solana.js
if: steps.cache-solana.js-install.outputs.cache-hit != 'true'
working-directory: javascript/solana.js
run: npm install && npm run build
- name: Start Local Validator
uses: switchboard-xyz/solana-local-validator@v0.1
with:
solana-version: v1.14.10
anchor-version: v0.25.2
anchor-version: v0.25.0
cluster: devnet
args:
"--url https://api.devnet.solana.com --clone
@ -48,3 +87,48 @@ jobs:
- name: Run Tests
working-directory: javascript/solana.js
run: npm run test:localnet
job3:
name: "@switchboard-xyz/solana.js Mainnet Tests"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Cache Build For Next Jobs
id: cache-solana.js-install
uses: actions/cache@v3
with:
key:
${{ runner.os }}-Solana.js-${{
hashFiles('javascript/solana.js/src/**') }}
path: |
javascript/solana.js/lib
- name: Use Node.js
if: steps.cache-solana.js-install.outputs.cache-hit != 'true'
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Build solana.js
if: steps.cache-solana.js-install.outputs.cache-hit != 'true'
working-directory: javascript/solana.js
run: npm install && npm run build
- name: Start Local Validator
uses: switchboard-xyz/solana-local-validator@v0.1
with:
solana-version: v1.14.10
anchor-version: v0.25.0
cluster: mainnet
args:
"--url https://api.devnet.solana.com --clone
SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f --clone
7nYabs9dUhvxYwdTnrWVBL9MYviKSfrEbdWCUbcnwkpF --clone
Fi8vncGpNKbq62gPo56G4toCehWNy77GgqGkTaAF5Lkk --clone
CyZuD7RPDcrqCGbNvLCyqk6Py9cEZTKmNKujfPi3ynDd --clone
J7nSEX8ADf3pVVicd6yKy2Skvg8iLePEmkLUisAAaioD"
- name: Run Tests
working-directory: javascript/solana.js
run: npm run test:localnet