| 1 | name: macos |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | push: |
| 6 | branches: |
| 7 | - main |
| 8 | |
| 9 | jobs: |
| 10 | build: |
| 11 | name: build |
| 12 | runs-on: [macos-latest] |
| 13 | strategy: |
| 14 | fail-fast: false |
| 15 | matrix: |
| 16 | go: ["stable", "oldstable"] |
| 17 | steps: |
| 18 | - name: Check out code into the Go module directory |
| 19 | uses: actions/checkout@v7 |
| 20 | |
| 21 | - name: Set up Go |
| 22 | uses: actions/setup-go@v6 |
| 23 | with: |
| 24 | go-version: ${{ matrix.go }} |
| 25 | id: go |
| 26 | |
| 27 | - name: Go version |
| 28 | run: go version |
| 29 | |
| 30 | - name: Get dependencies |
| 31 | run: go get -v -t -d ./... |
| 32 | |
| 33 | - name: Build |
| 34 | run: go build -v . |
| 35 | |
| 36 | - name: Test |
| 37 | run: script -q /dev/null go test -coverpkg="github.com/gdamore/tcell/v3/..." -covermode=count -coverprofile="coverage.txt" ./... |
| 38 | |
| 39 | - name: Upload coverage to Codecov |
| 40 | uses: codecov/codecov-action@v7 |
| 41 | with: |
| 42 | token: ${{ secrets.CODECOV_TOKEN }} |