Skip to content
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
36 changes: 23 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: i386 linux tests

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master
workflow_dispatch:

jobs:
lint:
name: Lint
runs-on: self-hosted
runs-on: self-hosted-ghr
steps:
- uses: actions/checkout@v4
with:
submodules: false

# Cache build tools to avoid downloading them each time
- uses: actions/cache@v4
Expand All @@ -23,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.0
go-version: 1.24
cache: false

- name: Run linters
Expand All @@ -32,17 +34,25 @@ jobs:
go run build/ci.go check_generate
go run build/ci.go check_baddeps

build:
runs-on: self-hosted
test:
name: Test
needs: lint
runs-on: self-hosted-ghr
strategy:
matrix:
go:
- '1.24'
- '1.23'
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24.0
go-version: ${{ matrix.go }}
cache: false

- name: Run tests
run: go test -short ./...
env:
GOOS: linux
GOARCH: 386
run: go test ./...
7 changes: 3 additions & 4 deletions internal/flags/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@
package flags

import (
"os/user"
"runtime"
"testing"
)

func TestPathExpansion(t *testing.T) {
user, _ := user.Current()
home := HomeDir()
var tests map[string]string

if runtime.GOOS == "windows" {
tests = map[string]string{
`/home/someuser/tmp`: `\home\someuser\tmp`,
`~/tmp`: user.HomeDir + `\tmp`,
`~/tmp`: home + `\tmp`,
`~thisOtherUser/b/`: `~thisOtherUser\b`,
`$DDDXXX/a/b`: `\tmp\a\b`,
`/a/b/`: `\a\b`,
Expand All @@ -40,7 +39,7 @@ func TestPathExpansion(t *testing.T) {
} else {
tests = map[string]string{
`/home/someuser/tmp`: `/home/someuser/tmp`,
`~/tmp`: user.HomeDir + `/tmp`,
`~/tmp`: home + `/tmp`,
`~thisOtherUser/b/`: `~thisOtherUser/b`,
`$DDDXXX/a/b`: `/tmp/a/b`,
`/a/b/`: `/a/b`,
Expand Down