This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
73 lines (68 loc) · 2.75 KB
/
testground.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
name: testground-ci
on:
push:
branches: [ "main" ]
paths:
- "crates/**"
- "test-plans/**"
- "Cargo.toml"
- ".github/workflows/testground.yml"
pull_request:
branches: [ "main" ]
paths:
- "crates/**"
- "test-plans/**"
- "Cargo.toml"
- ".github/workflows/testground.yml"
jobs:
tests:
name: test plan ${{ matrix.plan }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plan: ["data-transfer", "fetching"]
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v3
with:
go-version: '>=1.17.0'
- name: Create crates dir
run: mkdir -p test-plans/${{ matrix.plan }}/crates
- name: Copy ursa Cargo.toml
run: cp Cargo.toml test-plans/${{ matrix.plan }}/crates
- name: Copy ursa-network source code into test plan
run: cp -r crates/ursa-network test-plans/${{ matrix.plan }}/crates
- name: Copy ursa-store source code into test plan
run: cp -r crates/ursa-store test-plans/${{ matrix.plan }}/crates
- name: Copy ursa-index-provider source code into test plan
run: cp -r crates/ursa-index-provider test-plans/${{ matrix.plan }}/crates
- name: Copy ursa-metrics source code into test plan
run: cp -r crates/ursa-metrics test-plans/${{ matrix.plan }}/crates
- name: Use ursa-network from current commit
run: |
sed -i \
's|ursa-network = { git = "https://github.com/fleek-network/ursa" }|ursa-network = { path = "crates/ursa-network" }|g' \
test-plans/${{ matrix.plan }}/Cargo.toml
- name: Use ursa-store from current commit
run: |
sed -i \
's|ursa-store = { git = "https://github.com/fleek-network/ursa" }|ursa-store = { path = "crates/ursa-store" }|g' \
test-plans/${{ matrix.plan }}/Cargo.toml
- name: Use ursa-index-provider from current commit
run: |
sed -i \
's|ursa-index-provider = { git = "https://github.com/fleek-network/ursa" }|ursa-index-provider = { path = "crates/ursa-index-provider" }|g' \
test-plans/${{ matrix.plan }}/Cargo.toml
- name: Clone testground
run: git clone https://github.com/testground/testground.git
- name: Install testground
run: cd testground && make install && cd ..
- name: Append to path
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Import test plans
run: testground plan import --from ./test-plans/ --name ursa
- name: Run test plan
run: testground daemon & sleep 5 && testground run composition -f test-plans/${{ matrix.plan }}/_compositions/rust.toml --wait
- name: Kill testground daemon
run: kill $!