mirror of
https://github.com/foomo/sesamy-cli.git
synced 2026-08-16 22:50:25 +00:00
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Test Branch
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
merge_group:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
# https://github.com/actions/checkout/releases
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
|
|
# https://github.com/jdx/mise-action/releases
|
|
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4
|
|
|
|
# https://github.com/actions/setup-go/releases
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
|
with:
|
|
check-latest: true
|
|
go-version-file: go.mod
|
|
|
|
- name: Setup golangci-lint cache
|
|
# https://github.com/actions/cache/releases
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
|
|
with:
|
|
path: ~/.cache/golangci-lint
|
|
key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/go.mod') }}
|
|
restore-keys: |
|
|
golangci-lint-${{ runner.os }}--
|
|
|
|
- name: Run tidy
|
|
run: make tidy && git diff --exit-code
|
|
|
|
- name: Run generate
|
|
run: make generate && git diff --exit-code
|
|
|
|
- name: Run lint
|
|
run: make lint.branch
|
|
|
|
- name: Run tests
|
|
run: make test
|
|
|
|
# https://github.com/codecov/codecov-action/releases
|
|
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
|
|
if: success() && github.ref == 'refs/heads/main'
|
|
with:
|
|
fail_ci_if_error: false
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./coverage.out
|