-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (79 loc) · 2.75 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
on:
# Every pull request
pull_request:
push:
branches:
- main
name: build
jobs:
tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
# macos is burning my free minutes way too fast
#operating-system: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: install npm dependencies
run: cd ./solarkraft && npm ci
- name: compile solarkraft
run: cd ./solarkraft && npm run compile
- name: unit tests
run: cd ./solarkraft && npm run test
- name: integration tests
run: cd ./solarkraft && npm run integration
housekeeping:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: install npm dependencies
run: cd ./solarkraft && npm ci
- name: eslint
run: cd ./solarkraft && npm run lint
- name: check license
run: cd ./solarkraft && (npm run license | grep -v updated) || echo "fix with 'npm run license'"
- name: check formatting
run: cd ./solarkraft && (npx prettier --config .prettierrc --check src/**/*.ts test/**/*.ts) || echo "fix with 'npm run format'"
contracts-unit-tests:
name: contracts-unit-tests
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup target add wasm32-unknown-unknown
- uses: stellar/binaries@v22
with:
name: soroban-cli
version: '20.0.0-rc.4.1'
# version 21 is not available in stellar/binaries yet
#version: '21.0.0-preview.1'
- name: build
run: cd ContractExamples && cargo build --verbose --workspace --exclude "soroban-timelock-contract" --exclude "soroban-token-contract"
- name: unit tests
run: cd ContractExamples && cargo test --verbose --workspace --exclude "soroban-timelock-contract" --exclude "soroban-token-contract"
# v21 is not available in stellar/binaries yet
#- name: populating Setter
# run: |
# soroban network add \
# --global testnet \
# --rpc-url https://soroban-testnet.stellar.org:443 \
# --network-passphrase "Test SDF Network ; September 2015"
# soroban keys generate --global alice --network testnet
# cd ContractExamples
# ./scripts/setter-populate.sh