[wip] add CI tests
This commit is contained in:
parent
c8939d0804
commit
9b937d9071
53
.gitea/workflows/test.yml
Normal file
53
.gitea/workflows/test.yml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unit-tests:
|
||||||
|
name: "Run unit tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
check-latest: true
|
||||||
|
- name: "Run DB container"
|
||||||
|
run: docker compose -f test/compose.yml up --wait --quiet-pull
|
||||||
|
- name: "Run tests"
|
||||||
|
run: go test -v ./...
|
||||||
|
|
||||||
|
integration-tests:
|
||||||
|
name: "Run integration tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
check-latest: true
|
||||||
|
# TODO: replace with release
|
||||||
|
- name: "Install stack-orchestrator"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: cerc-io/stack-orchestrator
|
||||||
|
ref: plugeth-testing
|
||||||
|
path: ./stack-orchestrator
|
||||||
|
- name: "Run testnet stack"
|
||||||
|
env:
|
||||||
|
LACONIC_SO: ./laconic-so
|
||||||
|
run: ./scripts/integration-setup.sh
|
||||||
|
- name: "Clone system-tests"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: cerc-io/system-tests
|
||||||
|
ref: roy/dev
|
||||||
|
path: ./system-tests
|
||||||
|
- name: "Build docker image"
|
||||||
|
run: make docker
|
||||||
|
- name: "Run tests"
|
||||||
|
run: |
|
||||||
|
pytest -v \
|
||||||
|
--accounts-url="$GETH_BOOTNODE_URL/accounts.csv"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user