switch to use blackbox testing, move tests to separate module #149
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
# Default to 'contents: read', which grants actions to read commits. | |
# | |
# If any permission is set, any permission not included in the list is | |
# implicitly set to "none". | |
# | |
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
permissions: | |
contents: read | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go: ["1.18.x", "1.22.x", "1.23.x"] | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Test | |
run: cd test && go test -v . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: go mod tidy | |
run: | | |
go mod tidy | |
git diff --exit-code | |
- name: Lint | |
run: | | |
docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term \ | |
golangci/golangci-lint:v1.62.2 golangci-lint run -v \ | |
-E gofmt \ | |
-E misspell \ | |
-E revive | |
- name: Lint tests | |
run: | | |
docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term/test \ | |
golangci/golangci-lint:v1.62.2 golangci-lint run -v \ | |
-E gofmt \ | |
-E misspell \ | |
-E revive |