htmgo/.github/workflows/run-cli-tests.yml
maddalax 6ec582a834
allow partials throughout the project, not just partials folder (#72)
* allow partials throughout the project, not jsut partials file

* route directly to partial

* generate correctly even if there is no partials

* run cli tests

* tidy

* only run tests on master if push

* add codecov
2024-11-11 09:17:57 -06:00

33 lines
718 B
YAML

name: CLI Tests
on:
push:
branches:
- master
pull_request:
branches:
- '**' # Runs on any pull request to any branch
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23' # Specify the Go version you need
- name: Install dependencies
run: cd ./cli/htmgo && go mod download
- name: Run Go tests
run: cd ./cli/htmgo && go test ./... -coverprofile=coverage.txt
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}