Check if stderr is a terminal for error messages #4707
Workflow file for this run
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: Continuous integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
rust_channel: | |
- stable | |
include: | |
- os: ubuntu-latest | |
system: x86_64-linux | |
- os: macos-latest | |
system: x86_64-darwin | |
continue-on-error: true | |
runs-on: ${{ matrix.os }} | |
# The `== true` makes it work wether continue-on-error has been defined or not. | |
continue-on-error: ${{ matrix.continue-on-error == true }} | |
steps: | |
- name: Checking out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Installing Nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
accept-flake-config = true | |
- name: Setup Cachix | |
uses: cachix/cachix-action@v14 | |
with: | |
name: tweag-nickel | |
authToken: '${{ secrets.CACHIX_TWEAG_NICKEL_AUTH_TOKEN }}' | |
- name: Run all checks | |
run: | | |
# see https://github.com/NixOS/nix/issues/8949 for why we redirect to | |
# an output file. Everything else is just capturing the error code | |
# while still printing the logs | |
set +e | |
nix flake check --print-build-logs > logs 2>&1 | |
errcode=$? | |
cat logs | |
exit $errcode | |
- name: Typecheck benchmarks | |
run: find benches -type f -name "*.ncl" -print0 | xargs -0 -I file nix run . -- -f file typecheck |