Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-enable windows test #163

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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