Add tests into ci #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
LOG_LEVEL: DEBUG | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
env: | |
BEACONCHAIN_URL: ${{ secrets.BEACONCHAIN_URL }} | |
RPC_URL: ${{ secrets.RPC_URL }} | |
WS_URL: ${{ secrets.WS_URL }} | |
IPFS_URL: ${{ secrets.IPFS_URL }} | |
LOG_LEVEL: DEBUG | |
steps: | |
# Checkout code | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Run unit tests | |
- name: Run Unit Tests | |
run: | | |
echo "Running Unit Tests" | |
go test -v --race -tags=unit ./... | |
# Run integration tests | |
- name: Run Integration Tests | |
run: | | |
echo "Running Integration Tests" | |
go test -v --race -tags=integration ./... |