Skip to content

Commit

Permalink
Merge pull request #163 from abema/gha-workflow-windows
Browse files Browse the repository at this point in the history
re-enable windows test
  • Loading branch information
sunfish-shogi committed Jan 22, 2024
2 parents 81d0a24 + 726681f commit 0e1001f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ jobs:
test:
strategy:
matrix:
# FIXME: windows-latest not working
# os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
go-version: [ "1.19", "1.20", ">=1.21" ]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -22,7 +20,7 @@ jobs:
go-version: ${{ matrix.go-version }}
check-latest: true
- run: go vet ./...
- run: go test -coverprofile=coverage.txt -covermode=atomic ./...
- run: go test "-coverprofile=coverage.txt" -covermode=atomic ./...
- run: go install ./cmd/mp4tool
- name: Upload Coverage Report
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.go-version == '1.19' }}
Expand Down
6 changes: 4 additions & 2 deletions cmd/mp4tool/internal/dump/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ func TestDump(t *testing.T) {
os.Stdout = stdout
}()
os.Stdout = w
Main(append(tc.options, tc.file))
w.Close()
go func() {
require.Zero(t, Main(append(tc.options, tc.file)))
w.Close()
}()
b, err := io.ReadAll(r)
require.NoError(t, err)
assert.Equal(t, tc.wants, string(b))
Expand Down
6 changes: 4 additions & 2 deletions cmd/mp4tool/internal/extract/extract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ func TestExtract(t *testing.T) {
os.Stdout = stdout
}()
os.Stdout = w
require.Zero(t, Main([]string{tc.boxType, tc.file}))
w.Close()
go func() {
require.Zero(t, Main([]string{tc.boxType, tc.file}))
w.Close()
}()
b, err := io.ReadAll(r)
require.NoError(t, err)
assert.Equal(t, tc.expectedSize, len(b))
Expand Down
6 changes: 4 additions & 2 deletions cmd/mp4tool/internal/probe/probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ func TestProbe(t *testing.T) {
os.Stdout = stdout
}()
os.Stdout = w
Main(append(tc.options, tc.file))
w.Close()
go func() {
require.Zero(t, Main(append(tc.options, tc.file)))
w.Close()
}()
b, err := io.ReadAll(r)
require.NoError(t, err)
assert.Equal(t, tc.wants, string(b))
Expand Down
6 changes: 4 additions & 2 deletions cmd/mp4tool/internal/psshdump/psshdump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ func TestPsshdump(t *testing.T) {
os.Stdout = stdout
}()
os.Stdout = w
Main(append(tc.options, tc.file))
w.Close()
go func() {
require.Zero(t, Main(append(tc.options, tc.file)))
w.Close()
}()
b, err := io.ReadAll(r)
require.NoError(t, err)
assert.Equal(t, tc.wants, string(b))
Expand Down

0 comments on commit 0e1001f

Please sign in to comment.