Sync with upstream #1
Workflow file for this run
This file contains hidden or 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: CI - Test Suite | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| GO_VERSION: "1.23.3" | |
| # A stable environment for PRs. | |
| # Set CHANNEL to nightly and update CI_E2E_FILENAME when adding a new feature. | |
| # Change back to stable once the new feature is released. | |
| CI_E2E_FILENAME: "rel-nightly" | |
| CHANNEL: nightly | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| services: | |
| postgres: | |
| image: postgres:13.11-bullseye | |
| env: | |
| POSTGRES_PASSWORD: pgpass | |
| POSTGRES_USER: pguser | |
| POSTGRES_DB: mydb | |
| ports: | |
| - 5555:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch full history | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo NEEDRESTART_MODE=a apt-get -y install python3 python3-pip python3-setuptools python3-wheel libboost-math-dev libffi-dev docker-compose | |
| pip3 install -r misc/requirements.txt | |
| pip3 install e2e_tests/ | |
| - name: Install golangci-lint | |
| run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0 | |
| - name: Check formatting | |
| run: test -z "$(go fmt ./...)" | |
| - name: Run linter | |
| run: make lint | |
| - name: Run build check | |
| run: make check | |
| - name: Set up test environment | |
| run: | | |
| echo 'TEST_PG=host=localhost user=pguser password=pgpass dbname=mydb port=5555 sslmode=disable' >> $GITHUB_ENV | |
| echo 'TEST_FLAG=-p 1' >> $GITHUB_ENV | |
| - name: Run tests | |
| run: make test | |
| timeout-minutes: 15 | |
| - name: Run test-generate | |
| run: make test-generate | |
| - name: Install go-algorand ${{ env.CHANNEL }} binaries | |
| run: | | |
| wget https://raw.githubusercontent.com/algorand/go-algorand/rel/stable/cmd/updater/update.sh && chmod 744 update.sh | |
| ./update.sh -i -c ${{ env.CHANNEL }} -n -d ./ -p /usr/local/go/bin | |
| export GOPATH=/usr/local/go/ | |
| - name: Run e2e tests | |
| run: | | |
| make e2e | |
| make e2e-filter-test | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.txt | |
| flags: unittests | |
| name: codecov-umbrella |