Bump ci golang 20 21 (#95) #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [ '1.20', '1.21'] | |
permissions: | |
contents: read | |
pull-requests: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@v3 | |
- name: Start SurrealDB | |
run: docker run -it -d --rm --name surrealdb -p 8000:8000 surrealdb/surrealdb:nightly start -u root -p root | |
- name: Test | |
run: go test -v -cover ./... | |
env: | |
SURREALDB_URL: ws://localhost:8000/rpc | |
- name: Stop SurrealDB | |
run: docker stop -t 1 surrealdb |