Skip to content

Commit

Permalink
Run tests on macOS and Windows (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <knqyf263@gmail.com>
  • Loading branch information
knqyf263 authored Nov 16, 2023
1 parent ac49267 commit 1399746
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
on: [push, pull_request]
name: Test

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: windows-latest
shell: bash
- os: macos-latest
shell: bash

runs-on: ${{ matrix.os }}

steps:
- name: Install Go
uses: actions/setup-go@v3
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46
go-version-file: go.mod

- name: Test
run: go test ./...
run: |
go test -v ./...
4 changes: 2 additions & 2 deletions pkg/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/binary"
"encoding/hex"
"fmt"
"path/filepath"
"path"
"strings"
"time"

Expand Down Expand Up @@ -401,7 +401,7 @@ func (p *PackageInfo) InstalledFileNames() ([]string, error) {
var filePaths []string
for i, baseName := range p.BaseNames {
dir := p.DirNames[p.DirIndexes[i]]
filePaths = append(filePaths, filepath.Join(dir, baseName))
filePaths = append(filePaths, path.Join(dir, baseName)) // should be slash-separated
}
return filePaths, nil
}
Expand Down

0 comments on commit 1399746

Please sign in to comment.