Fix tests according to HV2 app setup. #73
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
# TODO HV2: remove GIT_TERMINAL_PROMPT, GOPRIVATE and GH_ACCESS_TOKEN vars once heimdall-v2 is a public repo | |
# also, "git config --global url.https://[email protected]/.insteadOf https://github.com/ &&" can be removed in each run step | |
name: CI | |
on: | |
push: | |
branches: | |
- "devel" | |
pull_request: | |
branches: | |
- "**" | |
types: [opened, synchronize] | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
env: | |
GIT_TERMINAL_PROMPT: 1 | |
GOPRIVATE : github.com/0xPolygon/heimdall-v2 | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: "Build binaries" | |
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make build | |
test-unit: | |
env: | |
GIT_TERMINAL_PROMPT: 1 | |
GOPRIVATE: github.com/0xPolygon/heimdall-v2 | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
name: test-unit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.x | |
cache: true | |
cache-dependency-path: go.sum | |
- name: "Run unit tests" | |
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-unit | |
test-e2e: | |
env: | |
GIT_TERMINAL_PROMPT: 1 | |
GOPRIVATE: github.com/0xPolygon/heimdall-v2 | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
name: test-e2e | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.x | |
cache: true | |
cache-dependency-path: go.sum | |
- name: "Run e2e tests" | |
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-e2e | |
test-integration: | |
env: | |
GIT_TERMINAL_PROMPT: 1 | |
GOPRIVATE: github.com/0xPolygon/heimdall-v2 | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
name: test-integration | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.x | |
cache: true | |
cache-dependency-path: go.sum | |
- name: "Run integration tests" | |
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-integration | |
test-ledger: | |
env: | |
GIT_TERMINAL_PROMPT: 1 | |
GOPRIVATE: github.com/0xPolygon/heimdall-v2 | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
name: test-ledger | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.x | |
cache: true | |
cache-dependency-path: go.sum | |
- name: "Run ledger tests" | |
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-ledger-mock |