Add github workflow #3
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: E2E Integration Tests | |
| on: | |
| push: | |
| branches: [e2e] | |
| pull_request: | |
| branches: [e2e] | |
| jobs: | |
| e2e-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: "1.23" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Verify Docker Compose | |
| run: | | |
| docker --version | |
| docker compose version | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| run: | | |
| go mod download | |
| cd e2e && go mod download | |
| - name: Build mpcium binary | |
| run: | | |
| go build -o mpcium ./cmd/mpcium | |
| - name: Build mpcium-cli binary | |
| run: | | |
| go build -o mpcium-cli ./cmd/mpcium-cli | |
| - name: Make binaries executable and add to PATH | |
| run: | | |
| chmod +x mpcium mpcium-cli | |
| sudo mv mpcium /usr/local/bin/ | |
| sudo mv mpcium-cli /usr/local/bin/ | |
| - name: Verify binaries are available | |
| run: | | |
| which mpcium | |
| which mpcium-cli | |
| mpcium --version || echo "mpcium binary ready" | |
| mpcium-cli --version || echo "mpcium-cli binary ready" | |
| - name: Run E2E tests | |
| run: | | |
| cd e2e | |
| go test -v -timeout=600s -run TestKeyGeneration | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| - name: Cleanup Docker containers | |
| if: always() | |
| run: | | |
| cd e2e | |
| docker compose -f docker-compose.test.yaml down -v || true | |
| docker system prune -f || true | |
| - name: Upload test logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-logs | |
| path: e2e/logs/ | |
| retention-days: 7 | |