Nightly CI tests triggered from @rauljordan of #3074
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: Nightly CI | |
run-name: Nightly CI tests triggered from @${{ github.actor }} of ${{ github.head_ref }} | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run at 00:00 AM UTC | |
- cron: '0 0 * * *' | |
jobs: | |
# Only run on schedule | |
tests-scheduled: | |
name: Scheduled tests | |
runs-on: arbitrator-ci | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
strategy: | |
fail-fast: false | |
matrix: | |
test-mode: [legacychallenge, long, challenge, l3challenge, execution-spec-tests] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
submodules: recursive | |
- name: Setup CI | |
uses: ./.github/actions/ci-setup | |
- name: Build | |
run: make build test-go-deps -j | |
- name: Build all lint dependencies | |
run: make -j build-node-deps | |
- name: Lint | |
uses: golangci/golangci-lint-action@v8 | |
with: | |
version: latest | |
skip-cache: true | |
skip-save-cache: true | |
- name: Custom Lint | |
run: | | |
go run ./linters ./... | |
- name: Set environment variables | |
run: | | |
mkdir -p target/tmp/deadbeefbee | |
echo "TMPDIR=$(pwd)/target/tmp/deadbeefbee" >> "$GITHUB_ENV" | |
echo "GOMEMLIMIT=6GiB" >> "$GITHUB_ENV" | |
echo "GOGC=80" >> "$GITHUB_ENV" | |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV" | |
- name: run tests with race detection and hash state scheme | |
if: matrix.test-mode == 'race' | |
run: | | |
echo "Running tests with Hash Scheme" >> full.log | |
${{ github.workspace }}/.github/workflows/gotestsum.sh --race --timeout 90m --test_state_scheme hash | |
- name: run challenge tests | |
if: matrix.test-mode == 'challenge' | |
run: >- | |
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags challengetest | |
--run TestChallenge --timeout 120m --cover | |
- name: run L3 challenge tests | |
if: matrix.test-mode == 'l3challenge' | |
run: >- | |
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags challengetest | |
--run TestL3Challenge --timeout 120m --cover | |
- name: run legacy challenge tests | |
if: matrix.test-mode == 'legacychallenge' | |
run: >- | |
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags legacychallengetest | |
--run TestChallenge --timeout 60m --cover | |
- name: run long stylus tests | |
if: matrix.test-mode == 'long' | |
run: >- | |
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags stylustest | |
--run TestProgramLong --timeout 60m --cover | |
- name: run execution spec tests | |
if: matrix.test-mode == 'execution-spec-tests' | |
run: ${{ github.workspace }}/.github/workflows/runExecutionSpecTests.sh | |
- name: Archive detailed run log | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.test-mode }}-full.log | |
path: full.log | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: false | |
files: ./coverage.txt,./coverage-redis.txt | |
verbose: false | |
token: ${{ secrets.CODECOV_TOKEN }} | |
notify-on-failure: | |
name: Notify Slack on failure | |
needs: [tests-scheduled] | |
runs-on: ubuntu-4 | |
if: ${{ failure() }} | |
env: | |
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
steps: | |
- name: Send Slack notification | |
uses: slackapi/[email protected] | |
with: | |
errors: true | |
method: chat.postMessage | |
token: ${{ secrets.SLACK_BOT_TOKEN }} | |
payload: | | |
{ | |
"channel": "${{ secrets.SLACK_CHANNEL_ID }}", | |
"text": "⚠️ CI job failed! ${{ env.RUN_URL }}", | |
} |