plugeth-statediff/.gitea/workflows/test.yml
Roy Crihfield 8bc7d62d4f
Some checks failed
Test / Run unit tests (pull_request) Failing after 55s
Test / Run integration tests (pull_request) Failing after 25s
CI wip
2023-07-06 17:30:34 +08:00

68 lines
1.9 KiB
YAML

name: Test
on:
pull_request:
branches: '*'
push:
branches:
- main
- ci-test
jobs:
unit-tests:
name: "Run unit tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
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
with:
path: ./plugeth-statediff
# TODO: replace with release
- uses: actions/checkout@v3
with:
repository: cerc-io/plugeth
ref: statediff-wip
path: ./plugeth
- name: "Install SSH for image builds"
working-directory: ./plugeth-statediff
run: |
mkdir -p _dev/.ssh
echo "${{ secrets.CI_SSH_PRIVATE_KEY }}" > _dev/.ssh/id_rsa
ssh-keyscan git.vdb.to >> _dev/.ssh/known_hosts
echo '[url "ssh://git@git.vdb.to"] insteadOf = https://git.vdb.to' > _dev/.gitconfig
cp -r _dev ../plugeth/
- name: "Install stack-orchestrator"
uses: actions/checkout@v3
with:
repository: roysc/stack-orchestrator
ref: plugeth-testing
path: ./stack-orchestrator
- run: pip install ./stack-orchestrator
- name: "Run testnet stack"
working-directory: ./plugeth-statediff
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: "Run tests"
run: |
pytest -v \
--accounts-url="$GETH_BOOTNODE_URL/accounts.csv"