Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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*':
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 8 additions & 4 deletions docs/contributing/HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Comment on lines +70 to +71
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit; optional] These two are already covered in the "Building" section. Since that's the section right above this one it seems redundant to include it again.

- 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.

Expand Down
Loading