feat!: added E2E test and docs for ConsumerModificationProposal #1936
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: Test | |
on: | |
workflow_call: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
- release/v* | |
- feat/* | |
permissions: | |
contents: read | |
concurrency: | |
group: ci-${{ github.ref }}-tests | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.proto | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
- uses: actions/[email protected] | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: proto check | |
run: make proto-check | |
- name: test & coverage report creation | |
if: env.GIT_DIFF | |
run: | | |
make test-unit-cov | |
- uses: actions/upload-artifact@v4 | |
if: env.GIT_DIFF | |
with: | |
name: "${{ github.sha }}-coverage" | |
path: ./profile.out | |
test-integration: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
- name: integration tests | |
if: env.GIT_DIFF | |
run: | | |
make test-integration-cov | |
- uses: actions/upload-artifact@v4 | |
if: env.GIT_DIFF | |
with: | |
name: "${{ github.sha }}-integration-coverage" | |
path: ./integration-profile.out | |
test-mbt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ">= 18" | |
check-latest: true | |
- run: npm i @informalsystems/quint -g | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
- name: mbt tests | |
if: env.GIT_DIFF | |
run: | | |
make test-mbt-cov | |
- uses: actions/upload-artifact@v4 | |
if: env.GIT_DIFF | |
with: | |
name: "${{ github.sha }}-mbt-coverage" | |
path: ./mbt-profile.out | |
- name: Archive MBT traces | |
uses: actions/upload-artifact@v4 | |
if: ${{ success() || failure() }} # to upload the traces only when the test failed | |
with: | |
name: mbt-traces | |
path: tests/mbt/driver/traces | |
retention-days: 6 # to not clog our cloud storage too much, we retain only for a few days | |
repo-analysis: | |
runs-on: ubuntu-latest | |
needs: [tests, test-integration, test-mbt] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
- uses: actions/download-artifact@v4 | |
if: env.GIT_DIFF | |
with: | |
name: "${{ github.sha }}-coverage" | |
- uses: actions/download-artifact@v4 | |
if: env.GIT_DIFF | |
with: | |
name: "${{ github.sha }}-integration-coverage" | |
- uses: actions/download-artifact@v4 | |
if: env.GIT_DIFF | |
with: | |
name: "${{ github.sha }}-mbt-coverage" | |
continue-on-error: true | |
- name: sonarcloud | |
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }} | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
test-e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: checkout LFS objects | |
run: git lfs checkout | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
Dockerfile* | |
- name: e2e tests | |
if: env.GIT_DIFF | |
run: | | |
make test-e2e-short | |
test-e2e-compatibility: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: checkout LFS objects | |
run: git lfs checkout | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
Dockerfile* | |
- name: e2e compatibility tests | |
if: env.GIT_DIFF | |
run: | | |
make test-e2e-compatibility-tests-latest | |
test-cometmock: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: checkout LFS objects | |
run: git lfs checkout | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
Dockerfile* | |
- name: cometmock tests | |
if: env.GIT_DIFF | |
run: | | |
make test-e2e-short-cometmock | |
test-trace: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: checkout LFS objects | |
run: git lfs checkout | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: true | |
cache: true | |
cache-dependency-path: go.sum | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/*.go | |
go.mod | |
go.sum | |
**/go.mod | |
**/go.sum | |
**/Makefile | |
Makefile | |
Dockerfile* | |
- name: trace-e2e tests | |
if: env.GIT_DIFF | |
run: | | |
make test-trace | |
model-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: checkout LFS objects | |
run: git lfs checkout | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ">= 18" | |
check-latest: true | |
- run: npm i @informalsystems/quint -g | |
- uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
tests/mbt/model/**.qnt | |
- name: verify the Quint model | |
if: env.GIT_DIFF | |
run: | | |
make verify-models |