-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.71 KB
/
test-dev.yml
File metadata and controls
60 lines (53 loc) · 1.71 KB
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: Test dev
on:
workflow_dispatch: {}
# push:
# branches: [main]
# pull_request:
# branches: [main]
env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: 1.9.13
ANCHOR_GIT: https://github.com/project-serum/anchor
RUST_TOOLCHAIN: nightly
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
jobs:
test:
runs-on: ubuntu-latest
name: Publish devnet test results
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-linux-build-deps
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: ./.github/actions/install-solana
with:
solana_version: ${{ env.SOLANA_VERSION }}
- uses: ./.github/actions/install-anchor
with:
anchor_git: ${{ env.ANCHOR_GIT }}
# Restore Cache from previous build/test
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./rust/target
key: ${{ env.cache_id }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUSTC_HASH }}
- name: Install Yarn dependencies
run: yarn install
- run: solana airdrop 2 twLqUrEvBPdtWFusa4MSWqkyE7TyhJTv3xBXiLYUNcX --url https://api.devnet.solana.com
- run: anchor test --skip-local-validator --skip-build --skip-deploy --provider.cluster devnet
- uses: dorny/test-reporter@v1
if: always()
with:
artifact: test-results
name: Local Tests
path: "tests/out.json"
reporter: mocha-json