diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52a5922..9915a0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,20 @@ jobs: - run: docker pull rust:slim - uses: ./ghaction-rust-coverage - run: grep '^SF:' lcov.info + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.5.3 + with: + path: ghaction-rust-coverage + - uses: actions/checkout@v3.5.3 + with: + repository: lpenz/ogle + path: ogle + fetch-depth: 0 + - uses: ./ghaction-rust-coverage + with: + working_directory: ogle publish-dockerhub: needs: [ omnilint, docker-build ] runs-on: ubuntu-latest diff --git a/README.md b/README.md index 1bc1c3f..2470244 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ jobs: ### Inputs - `dependencies_debian`: Debian packages to install before running the tests. +- `working_directory`: `cd` to this directory before running the action. - `output_type`: output type, one of `html`, `text`, `json` or `lcov`. - `output_path`: output path. - `test_args`: arguments to pass to the test - `--nocapture` for example. diff --git a/entrypoint b/entrypoint index b37ea1c..c5532ac 100755 --- a/entrypoint +++ b/entrypoint @@ -52,6 +52,10 @@ export RUST_BACKTRACE set -e -x +if [ -n "$INPUT_WORKING_DIRECTORY" ]; then + cd "$INPUT_WORKING_DIRECTORY" +fi + install_dependencies CARGO_INCREMENTAL='0'