Skip to content

ci: use codecov cli upload #51

ci: use codecov cli upload

ci: use codecov cli upload #51

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v5
- name: setup go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: dependency boundary guard
run: |
go mod tidy
git diff --exit-code go.mod go.sum
- name: unit tests with coverage
run: go test -count=1 ./... -coverpkg=./... -coverprofile=coverage.out -covermode=atomic
- name: integration tests (mocked runner)
run: go test -tags=integration ./... -run Integration -count=1
- name: end-to-end tests (built binary + fake osascript)
run: go test -tags=e2e ./... -run E2E -count=1
- name: race tests
run: go test -race ./... -count=1
- name: upload coverage to codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
if [ -z "${CODECOV_TOKEN}" ]; then
echo "CODECOV_TOKEN is not set; skipping Codecov upload."
exit 0
fi
python3 -m pip install --disable-pip-version-check codecov-cli
codecovcli upload-process --disable-search -f coverage.out -n "ci-${GITHUB_RUN_ID}" || \
echo "Codecov upload failed; continuing."