Skip to content

Commit

Permalink
Merge pull request #6 from k1LoW/workdir
Browse files Browse the repository at this point in the history
Support working directory (`workdir:`)
  • Loading branch information
k1LoW authored Jan 27, 2024
2 parents b0ffc61 + b1c29b1 commit caf1ba5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ jobs:
- uses: actions/checkout@v4
- uses: ./
with:
config: testdata/path/to/config.yml
config: testdata/path/to/.octocov.yml
test-run-with-workdir:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./
with:
workdir: testdata/path/to
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
config:
description: Config path
required: false
workdir:
description: Working directory
default: ''
required: false
runs:
using: 'composite'
steps:
Expand All @@ -39,7 +43,9 @@ runs:
const inputs = ${{ toJSON(inputs) }};
const toolpath = await io.which('octocov', true)
const opt = `--config=${inputs.config}`
await exec.exec(`${toolpath} ${opt}`)
const options = {};
options.cwd = inputs.workdir;
await exec.exec(`${toolpath} ${opt}`, [], options)
env:
OCTOCOV_GITHUB_TOKEN: ${{ inputs.github-token }}

File renamed without changes.

0 comments on commit caf1ba5

Please sign in to comment.