Fix for error introduced in the following commit: https://github.com/go-pkgz/auth/commit/06e72788bcbb23d958c60655b42892b95457477e After text/template was replaced with the html/template, the dev provider started escaping parameters which were not supposed to be escaped.
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
name: test_backend
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
tags:
|
|
paths:
|
|
- ".github/workflows/ci-test-backend.yml"
|
|
- "backend/**"
|
|
- "!backend/scripts/**"
|
|
- "!**.md"
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/ci-test-backend.yml"
|
|
- "backend/**"
|
|
- "!backend/scripts/**"
|
|
- "!**.md"
|
|
jobs:
|
|
test-backend:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: debug if needed
|
|
run: if [[ "$DEBUG" == "true" ]]; then env; fi
|
|
env:
|
|
DEBUG: ${{secrets.DEBUG}}
|
|
|
|
- name: install go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
|
|
- name: install golangci-lint and goveralls
|
|
run: |
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.46.1
|
|
go get -u github.com/mattn/goveralls
|
|
|
|
- name: test and lint backend
|
|
run: |
|
|
go test -race -timeout=60s -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
|
|
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov
|
|
$GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/backend/.golangci.yml run --out-format=github-actions ./...
|
|
working-directory: backend/app
|
|
env:
|
|
GOFLAGS: "-mod=vendor"
|
|
TZ: "America/Chicago"
|
|
|
|
- name: test and lint examples
|
|
run: |
|
|
go version
|
|
$GITHUB_WORKSPACE/golangci-lint version
|
|
go test -race ./...
|
|
$GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/backend/.golangci.yml run --out-format=github-actions ./...
|
|
working-directory: backend/_example/memory_store
|
|
env:
|
|
TZ: "America/Chicago"
|
|
|
|
- name: submit coverage
|
|
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
|
|
working-directory: backend
|
|
env:
|
|
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|