Files
go-sqlite3/.github/workflows/go.yaml
Evan Jones 6da13a7bd9 .github/workflows: stop using deprecated add-path command (#873)
Github is disabling the add-path command in workflows on 2020-11-16.
Switch to their new preferred way of doing this, by appending to the
file referred to with $GITHUB_PATH. See:

https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

This should fix the following warning from the workflows:

.github#L1
The `add-path` command is deprecated and will be disabled on November
16th. Please upgrade to using Environment Files. For more information
see:
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-11-17 01:56:45 +09:00

121 lines
3.3 KiB
YAML

name: Go
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: ['1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15']
fail-fast: false
env:
OS: ${{ matrix.os }}
GO: ${{ matrix.go }}
steps:
- if: startsWith(matrix.os, 'macos')
run: brew update
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Get Build Tools
run: |
go get github.com/ory/go-acc
- name: Add $GOPATH/bin to $PATH
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- name: 'Tags: default'
run: go-acc . -- -race -v -tags ""
- name: 'Tags: libsqlite3'
run: go-acc . -- -race -v -tags "libsqlite3"
- name: 'Tags: full'
run: go-acc . -- -race -v -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
- name: 'Tags: vacuum'
run: go-acc . -- -race -v -tags "sqlite_vacuum_full"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
env_vars: OS,GO
file: coverage.txt
test-windows:
name: Test for Windows
runs-on: windows-latest
defaults:
run:
shell: bash
strategy:
matrix:
go: ['1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15']
fail-fast: false
env:
OS: windows-latest
GO: ${{ matrix.go }}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-sqlite3
msystem: MINGW64
path-type: inherit
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Get Build Tools
run: |
go get -u github.com/ory/go-acc
shell: msys2 {0}
- name: Add $GOPATH/bin to $PATH
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: msys2 {0}
- uses: actions/checkout@v2
- name: 'Tags: default'
run: go-acc . -- -race -v -tags ""
shell: msys2 {0}
- name: 'Tags: libsqlite3'
run: go-acc . -- -race -v -tags "libsqlite3"
shell: msys2 {0}
- name: 'Tags: full'
run: |
echo 'skip this test'
echo go-acc . -- -race -v -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
shell: msys2 {0}
- name: 'Tags: vacuum'
run: go-acc . -- -race -v -tags "sqlite_vacuum_full"
shell: msys2 {0}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
env_vars: OS,GO
file: coverage.txt
# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml