diff --git a/Makefile b/Makefile index 434f8dce10..fe6af4a9ce 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,9 @@ build: build-cargo build-cargo: cargo build --release +clean: + cabal clean && cargo clean + # Runs units tests. # To run a set of unit tests matching a specific value, use ARGS # For example, to only run tests whose name matches the wildcard '*Node.PackageLockV3*': @@ -185,4 +188,4 @@ ci-shell: bench: cabal bench --benchmark-options '+RTS -T' -.PHONY: build-cli test integration-test analyze install-local fmt check check-fmt lint check-ci fmt-ci build-test-data clean-test-data install-dev test-all bench build-cargo test-cargo fmt-cargo check-fmt-cargo lint-cargo +.PHONY: build-cli test integration-test analyze install-local fmt check check-fmt lint check-ci fmt-ci build-test-data clean-test-data install-dev test-all bench build-cargo test-cargo fmt-cargo check-fmt-cargo lint-cargo clean diff --git a/cabal.project b/cabal.project index fc6b7dc2bb..8b2328551f 100644 --- a/cabal.project +++ b/cabal.project @@ -16,4 +16,4 @@ import: ./cabal.project.common package * extra-include-dirs: /opt/homebrew/include extra-lib-dirs: /opt/homebrew/lib - ghc-options: -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/ffi + ghc-options: -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi diff --git a/docs/contributing/HACKING.md b/docs/contributing/HACKING.md index e131445983..f39463cfc0 100644 --- a/docs/contributing/HACKING.md +++ b/docs/contributing/HACKING.md @@ -65,10 +65,14 @@ Here's a document that explains [how we do this](./forks.md) while making sure t ### Running tests -> You will need to run `git lfs pull` to retrieve testdata stored in git lfs. If you do not have git-lfs installed on your system, -> you can refer to: https://github.com/git-lfs/git-lfs#getting-started for git-lfs installation. - -Run the unit tests by running `cabal test unit-tests` in the base directory. +#### Prerequisites +- You will need to run `git lfs install` and `git lfs pull` to retrieve test data stored in git lfs. If you do not have git-lfs installed on your system, you can refer to: https://github.com/git-lfs/git-lfs#getting-started for git-lfs installation. +- Create a GitHub Personal Access Token with repo access to FOSSA repos. Store the token in the environment variable `GITHUB_TOKEN`. +- Download vendor dependencies by running `./vendor_download.sh`. +- Run `make clean`. You'll need to run a fresh build after downloading the vendor dependencies. + +#### Running the tests +Run the unit tests by running `make test-cabal` in the base directory. Integration tests require you first build test data by running `make build-test-data`. Then you can run them with `cabal test integration-tests`. Integration tests also require `nix`. See ["Installing Nix"](#installing-nix) below for installation instructions. Note that integration tests can take quite a while to run and do not have progress output.