server: Add field groups, data source config file #78
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: "CI" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build-test: | |
name: "Build & test using cabal" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: j-mueller/easy-bi | |
token: ${{ secrets.MY_TOKEN || github.token }} | |
# On pull_request events, we want to check out the latest commit of the | |
# PR, which is different to github.ref (the default, which would point | |
# to a "fake merge" commit). On push events, the default is fine as it | |
# refers to the pushed commit. | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
# Also ensure we have all history with all tags | |
fetch-depth: 0 | |
- name: Prepare nix | |
uses: cachix/install-nix-action@v18 | |
with: | |
extra_nix_config: | | |
accept-flake-config = true | |
substituters = https://cache.iog.io https://iohk.cachix.org https://cache.nixos.org/ | |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
allow-import-from-derivation = true | |
# - name: ❄ Cachix cache of nix derivations | |
# uses: cachix/cachix-action@v12 | |
# with: | |
# name: easy-bi | |
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cabal/packages | |
~/.cabal/store | |
dist-newstyle | |
key: | | |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'flake.nix', 'flake.lock') }} | |
restore-keys: | | |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'flake.nix', 'flake.lock') }} | |
- name: Build | |
run: | | |
nix develop .#ci --command bash -c 'cabal update' | |
nix develop .#ci --command bash -c 'cabal build --enable-tests all' | |
- name: Test | |
run: | | |
nix develop .#ci --command bash -c 'cabal test all' |