Skip to content

Fix tests

Fix tests #327

Workflow file for this run

name: codedown-languages
on:
pull_request:
push:
workflow_dispatch:
jobs:
verify-nixpkgs-revs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: verify-default-nix.sh
if: "!contains(github.event.head_commit.message, 'noci')"
run: ./scripts/verify-default-nix.sh
test:
name: ${{matrix.suite}}
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
suite:
- bash
- clojure
- coq
- cpp
- go
- haskell
- julia
- octave
- postgres
- python
- r
- ruby
- rust
- sample-environments
- searchers
- zsh
- spellchecker
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build tests
if: "!contains(github.event.head_commit.message, 'noci')"
run: |
cd tests
export NIX_PATH=nixpkgs=$(nix eval --raw .#nixpkgsPath.x86_64-linux)
export PATH=$(nix build --no-link .#stack.x86_64-linux --json | jq -r '.[0].outputs.out')/bin:$PATH
echo "Got path: $PATH"
stack build --nix --no-nix-pure
- name: Run tests
if: "!contains(github.event.head_commit.message, 'noci')"
run: |
cd tests
export TEST_ROOT=$(pwd)/test_root
echo "Got TEST_ROOT: $TEST_ROOT"
echo TEST_ROOT="$TEST_ROOT" >> $GITHUB_ENV
export NIX_PATH=nixpkgs=$(nix eval --raw .#nixpkgsPath.x86_64-linux)
export PATH=$(nix build --no-link .#stack.x86_64-linux --json | jq -r '.[0].outputs.out')/bin:$PATH
stack run --nix --no-nix-pure -- \
--print-failures \
--fixed-root "$TEST_ROOT" \
--markdown-summary "$GITHUB_STEP_SUMMARY" \
--${{matrix.suite}}
- name: Upload test artifacts
if: ${{ always() }}
continue-on-error: true
run: |
if [[ -n "$TEST_ROOT" ]]; then
echo "Uploading \"$TEST_ROOT/\""
rsync \
-e "ssh -F /secrets/ci_ssh_config" \
-azW --progress --mkpath \
"$TEST_ROOT/" \
tester@desktop1:/home/tester/all_test_runs/languages_${{github.workflow}}_${{github.run_number}}/${{matrix.suite}}
fi