Fix Windows tests, verify in CI (#394)
* ci: Test on Windows too Adds a Windows test run to CI. Go setup relies on GHA for this because Hermit doesn't yet support Windows. * fix(mapper_windows_test): assert.NotNil => assert.True assert.NotNil does not exist. * filecontent mapper: Handle error from directory If we couldn't read because the source is a directory, override the original error message. * fix(test): Handle platform-specific "file not found" messages
This commit is contained in:
@@ -12,9 +12,23 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Init Hermit
|
||||
run: ./bin/hermit env -r >> $GITHUB_ENV
|
||||
run: ./bin/hermit env -r >> "$GITHUB_ENV"
|
||||
- name: Test
|
||||
run: go test ./...
|
||||
|
||||
test-windows:
|
||||
name: Test / Windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21
|
||||
- name: Test
|
||||
run: go test ./...
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
@@ -22,6 +36,6 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Init Hermit
|
||||
run: ./bin/hermit env -r >> $GITHUB_ENV
|
||||
run: ./bin/hermit env -r >> "$GITHUB_ENV"
|
||||
- name: golangci-lint
|
||||
run: golangci-lint run
|
||||
|
||||
Reference in New Issue
Block a user