Skip to content

feat: initial implementation #9

feat: initial implementation

feat: initial implementation #9

Workflow file for this run

name: Continuous integration
on:
push:
branches: main
pull_request:
branches: main
workflow_dispatch: # allows manual triggering
schedule:
- cron: '1 11 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
unit_tests:
name: Unit Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=./default.nix
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
extra-substituters = https://cache.iog.io
- uses: tweag/configure-bazel-remote-cache-auth@v0
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
bazelrc_path: .bazelrc.auth
- name: Configure
run: |
cat >>.bazelrc.local <<EOF
common --config=ci
EOF
- name: Execute Bazel tests
shell: bash
run: |
bazel test //...
- name: Execute simple
uses: ./
with:
run: |
echo "FIRST" > integration_test.out
- name: Confirm output
shell: bash
run: |
output="$(<integration_test.out)"
[[ "${output}" == "FIRST" ]] || \
(echo >&2 "FIRST was not found"; exit 1)
all_ci_tests:
runs-on: ubuntu-latest
needs:
- unit_tests
if: ${{ always() }}
steps:
- uses: cgrindel/gha_join_jobs@794a2d117251f22607f1aab937d3fd3eaaf9a2f5 # v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}