Some checks failed
Lint / govulncheck (push) Failing after 10m42s
Lint / golangci-lint (push) Failing after 10m45s
Lint / Lint markdown (push) Failing after 14m10s
Tests / Code Coverage / test-unit (push) Failing after 18m3s
Tests / Code Coverage / test-integration (push) Failing after 21m5s
Tests / Code Coverage / test-e2e (push) Failing after 24m32s
Part of https://plan.wireit.in/deepstack/browse/VUL-267/ - Upgrade dependencies as required by zenithd: - `cosmos/cosmos-sdk`: `v0.50.4` -> `v0.53.4` - `cometbft/cometbft`: `v0.38.5` -> `v0.38.19` - Update CI workflows for this Gitea fork Reviewed-on: #1 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
101 lines
2.5 KiB
YAML
101 lines
2.5 KiB
YAML
name: Tests / Code Coverage
|
|
on:
|
|
pull_request:
|
|
merge_group:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}-tests
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test-unit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.2
|
|
cache: true
|
|
cache-dependency-path: go.sum
|
|
- uses: https://github.com/technote-space/get-diff-action@v6.1.2
|
|
id: git_diff
|
|
with:
|
|
PATTERNS: |
|
|
**/*.go
|
|
go.mod
|
|
go.sum
|
|
- name: Unit Tests
|
|
if: env.GIT_DIFF
|
|
run: |
|
|
go work init
|
|
make test-unit
|
|
# Disabled for the gitea fork - Test coverage report not required
|
|
# - name: Test Coverage
|
|
# run: |
|
|
# go work init ||:
|
|
# make test-cover
|
|
# - name: Upload coverage reports to Codecov
|
|
# uses: codecov/codecov-action@v4
|
|
# env:
|
|
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
# with:
|
|
# files: cover.out
|
|
test-integration:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.2
|
|
cache: true
|
|
cache-dependency-path: go.sum
|
|
- uses: https://github.com/technote-space/get-diff-action@v6.1.2
|
|
id: git_diff
|
|
with:
|
|
PATTERNS: |
|
|
**/*.go
|
|
go.mod
|
|
go.sum
|
|
- name: tests
|
|
if: env.GIT_DIFF
|
|
run: |
|
|
go work init
|
|
make test-integration
|
|
test-e2e:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 25
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: https://github.com/technote-space/get-diff-action@v6.1.2
|
|
with:
|
|
PATTERNS: |
|
|
**/**.go
|
|
go.mod
|
|
go.sum
|
|
- uses: actions/setup-go@v5
|
|
if: env.GIT_DIFF
|
|
with:
|
|
go-version: 1.23.2
|
|
cache: true
|
|
|
|
# In this step, this action saves a list of existing images, the cache is
|
|
# created without them in the post run. It also restores the cache if it
|
|
# exists.
|
|
- name: cache docker layer
|
|
uses: satackey/action-docker-layer-caching@v0.0.11
|
|
if: env.GIT_DIFF
|
|
# Ignore the failure of a step and avoid terminating the job.
|
|
continue-on-error: true
|
|
|
|
- name: E2E Tests
|
|
if: env.GIT_DIFF
|
|
run: |
|
|
go work init
|
|
make test-e2e
|