Skip to content

fix Windows copyDir test helper permissions #576

fix Windows copyDir test helper permissions

fix Windows copyDir test helper permissions #576

Workflow file for this run

name: test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
name: ${{ matrix.os }} / ${{ matrix.go-version || 'minimum' }}
strategy:
fail-fast: false
matrix:
go-version:
- "" # leave empty to use go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646
- oldstable
- stable
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod # used when go-version is empty.
- name: lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.12
args: --timeout=10m --verbose
- name: Test
run: go test -v -cover "-coverprofile=coverage.txt" -covermode=atomic ./...
shell: bash
env:
MSYS_NO_PATHCONV: '1'
- name: Test (root)
if: runner.os == 'Linux' && !cancelled()
run: go test -exec "sudo -E -n" -v -cover "-coverprofile=coverage.txt" -covermode=atomic ./...
shell: bash
env:
MSYS_NO_PATHCONV: '1'
- name: Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
directory: ./