You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.7 KiB
YAML

on: [push, pull_request]
name: Test
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
target: [
aarch64-linux-gnu,
aarch64-linux-musl,
aarch64-macos,
i386-linux-gnu,
i386-linux-musl,
i386-windows,
x86_64-linux-gnu,
x86_64-linux-musl,
x86_64-macos,
x86_64-windows-gnu,
]
runs-on: ${{ matrix.os }}
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
# Install Nix and use that to run our tests so our environment matches exactly.
- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
# Run our checks to catch quick issues
- run: nix flake check
# Run our go tests within the context of the dev shell from the flake. This
# will ensure we have all our dependencies.
- name: test
run: nix develop -c zig build -Dtarget=${{ matrix.target }}
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
# Install Nix and use that to run our tests so our environment matches exactly.
- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
# Run our checks to catch quick issues
- run: nix flake check
# Run our go tests within the context of the dev shell from the flake. This
# will ensure we have all our dependencies.
- name: test
run: nix develop -c zig build test