Skip to content

use t.Setenv in testing #202

use t.Setenv in testing

use t.Setenv in testing #202

Workflow file for this run

name: test
on:
pull_request:
branches:
- "**"
push:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
if: "matrix.os == 'windows-latest'"
- name: checkout
uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: test
run: go test -coverprofile coverage.out -covermode atomic ./...
env:
BLOGSYNC_TEST_BLOG: blogsynctest.hatenablog.com
BLOGSYNC_USERNAME: Songmu
BLOGSYNC_PASSWORD: ${{ secrets.BLOGSYNC_SONGMU_PASSWORD }}
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.github_token }}
path-to-profile: coverage.out
parallel: true
flag-name: ${{ matrix.os }}
finish:
runs-on: ubuntu-latest
needs: test
steps:
- name: finish coverage report
uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true