Skip to content

Fix cache dir mistake :( #2823

Fix cache dir mistake :(

Fix cache dir mistake :( #2823

name: Integration Tests
# Only run workflow manually
# Refer to https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch
on:
push:
workflow_dispatch:
schedule:
- cron: "0 5 * * *" # At 05:00 on every day.
jobs:
integration-test:
name: integration-test
runs-on:
group: "FOSSA CLI Runner"
# Be sure to update the env below too
container: fossa/haskell-static-alpine:ghc-9.4.7
env:
GHC_VERSION: '9.4.7'
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
with:
lfs: true
- name: Ensures git ownership check does not lead to compile error (we run git during compile for version tagging, etc.)
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# adduser cannot add users to group: https://unix.stackexchange.com/a/397733
# so we edit /etc/group directly
- name: Create nixbuild users/group
run: |
addgroup nixbld
adduser -D nixbld-1
adduser -D nixbld-2
adduser -D nixbld-3
sed 's/nixbld:x:\([[:digit:]]*\):$/nixbld:x:\1:nixbld-1,nixbld-2,nixbld-3/' /etc/group > group-changed
mv group-changed /etc/group
- name: run our custom nix install script
run : ./.github/scripts/install-nix.sh
shell: bash
env:
INPUT_NIX_PATH: "nixpkgs=channel:nixos-unstable"
INPUT_EXTRA_NIX_CONFIG: "build-users-group = nixbld"
INPUT_INSTALL_URL: ""
INPUT_INSTALL_OPTIONS: ""
- name: Debugging information
run: |
ghc --version || echo "no ghc"
cabal --version || echo "no cabal"
ghcup --version || echo "no ghcup"
rustc -V || echo "no rustc"
cargo -V || echo "no cargo"
- uses: Swatinem/rust-cache@v2
- uses: actions/cache@v3
name: Cache cabal store
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store || '~/.cabal/store' }}
"${{ github.workspace }}/dist-newstyle/"
key: ${{ runner.os }}-${{ env.GHC_VERSION }}-cabal-cache-${{ hashFiles('**/*.cabal', 'cabal.project.ci.linux') }}
restore-keys: |
${{ runner.os }}-${{ env.GHC_VERSION }}-cabal-cache-
${{ runner.os }}-${{ env.GHC_VERSION }}-
${{ runner.os }}-
- name: Build Rust dependencies
run: cargo build --release
- name: Update vendored binaries
run: |
mkdir vendor-bins
./vendor_download.sh
env:
GITHUB_TOKEN: ${{ secrets.BASIS_ACCESS_TOKEN }}
- name: Build
env:
RUN_CMD: cabal build --project-file=cabal.project.ci.linux all
run: |
cabal update
$RUN_CMD || $RUN_CMD
- name: Run all integration tests
run: |
cabal test --project-file=cabal.project.ci.linux --test-show-details=direct --test-option=--times integration-tests