Add Nix build for the server #1761
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: tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SPACES_KEY: ${{ secrets.SPACES_KEY }} | |
SPACES_SECRET: ${{ secrets.SPACES_SECRET }} | |
steps: | |
# Setup | |
- name: Check out source repository | |
uses: actions/checkout@v2 | |
- name: Cache NPM dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Cache PureScript dependencies | |
uses: actions/cache@v2 | |
with: | |
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }} | |
path: | | |
.spago | |
output | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v4 | |
with: | |
github-token: ${{ env.GITHUB_TOKEN }} | |
- name: Setup Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
# Separates all the cache downloading time from the time required to actually run a step | |
# of the workflow | |
- name: Initialize Nix | |
run: nix develop | |
# Checks for the Registry Draft | |
- name: "Check that all Dhall compiles, and fixtures correctly conform to a Manifest" | |
run: nix develop --command 'registry-verify-dhall' | |
- name: "Build project" | |
run: nix develop --command 'registry-build' | |
- name: "Run tests" | |
run: nix develop --command 'registry-test' | |
- name: "Verify CI code formats" | |
run: nix develop --command 'registry-check-format' |