Skip to content

Commit

Permalink
🧱 Enable Windows local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jan 15, 2022
1 parent 4527160 commit 45447ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/example.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ on: # rebuild any PRs and main branch changes

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- run: |
npm install
- run: |
npm run all
npm test
test-ubuntu: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
Expand Down
14 changes: 9 additions & 5 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function inputsDefaultFixture(): Inputs {
}

function defaultDockerRunCommandFixture(): string[] {
return [
let args = [
'run',
'--rm',
'-e',
Expand All @@ -91,9 +91,12 @@ function defaultDockerRunCommandFixture(): string[] {
'-v',
'${{ github.workspace }}:/data/project',
'-v',
'${{ runner.temp }}/qodana-results:/data/results',
'-u',
`${process.getuid()}:${process.getgid()}`,
'${{ runner.temp }}/qodana-results:/data/results'
]
if (process.platform !== 'win32') {
args.push('-u', `${process.getuid()}:${process.getgid()}` ?? '1001:1001')
}
args.push(
'-v',
'/tmp/project:/data/project',
'-e',
Expand All @@ -106,7 +109,8 @@ function defaultDockerRunCommandFixture(): string[] {
'10',
'-n',
'qodana.recommended'
]
)
return args
}

test('docker run command args', () => {
Expand Down

0 comments on commit 45447ae

Please sign in to comment.