Skip to content

Add Nix build for the server #1761

Add Nix build for the server

Add Nix build for the server #1761

Workflow file for this run

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'