Skip to content

fix zai thinkback test assertions #290

fix zai thinkback test assertions

fix zai thinkback test assertions #290

Workflow file for this run

name: Linux amd64
on:
push:
branches: [main]
tags: ['[0-9]+.[0-9]+.[0-9]+']
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: stable
repo-token: ${{ secrets.GITHUB_TOKEN }}
parent-nim-install-directory: $HOME
nim-install-directory: nim-toolchain
- name: Install dependencies
# All deps resolve by name from threecode.nimble via the public
# package registry; tags are versions, so tag builds get tagged
# dependency versions.
run: |
nimble install -y --depsOnly
- name: Compute build flags
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
# autoupdate on releases only
echo "BUILD_FLAGS=-d:autoUpdate" >> "$GITHUB_ENV"
fi
- name: Build
run: nimble build -y -d:release ${{ env.BUILD_FLAGS }}
- name: Run tests
# tools/ci_tests.sh wraps `testament all`: categories still run in
# parallel (one testament child per category), but output lands in
# a log file instead of a pipe, a watchdog bounds the run and
# attributes any hang to the exact test binary, and the exit code
# is propagated. The old `for c in ...; testament cat` loop ran
# categories sequentially and, worse, a single hung test stalled
# the pipe so the step showed nothing after it.
run: sh tools/ci_tests.sh 1500
timeout-minutes: 30
- name: Package
run: |
mkdir -p 3code-linux-amd64
cp 3code 3code-linux-amd64/
# Capture the version from the built binary so it can be checked
# without running the binary on its target OS.
./3code -v > 3code-linux-amd64/VERSION
cp README.md LICENSE 3code-linux-amd64/
tar czf 3code-linux-amd64.tar.gz 3code-linux-amd64
- name: Upload artifact (GitHub Actions)
uses: actions/upload-artifact@v4
with:
name: 3code-linux-amd64
path: 3code-linux-amd64.tar.gz
- name: Upload artifact to 3code.capocasa.dev
if: github.ref == 'refs/heads/main'
run: |
# --retry: 5xx is transient on the upload endpoint
curl -f --retry 5 --retry-delay 5 -H "Authorization: Bearer ${{ secrets.RELEASE_SECRET }}" -F "file=@3code-linux-amd64.tar.gz" \
https://3code.capocasa.dev/main/builds/upload.nim