Skip to content

Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 #352

Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0

Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 #352

Workflow file for this run

on: [push, pull_request]
name: Run Test Cases
jobs:
go-path-test:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
path: src/github.com/qiniu/go-sdk
ref: ${{ github.ref }}
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.10.x'
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Run unit cases
run: |
GOPATH=$GITHUB_WORKSPACE go get github.com/qiniu/x
GOPATH=$GITHUB_WORKSPACE go get golang.org/x/sync/singleflight
GOPATH=$GITHUB_WORKSPACE go get github.com/qiniu/dyn
# FIXME special package
# github.com/go-playground/validator/v10
# validator modified package name
# from gopkg.in/go-playground/validator.v10 to github.com/go-playground/validator/v10
# new package name don't work in non-module mode
rm -rf $GITHUB_WORKSPACE/src/github.com/go-playground/validator/v10 && git clone -b v10.9.0 --depth 1 https://github.com/go-playground/validator.git $GITHUB_WORKSPACE/src/github.com/go-playground/validator/v10
rm -rf $GITHUB_WORKSPACE/src/github.com/universal-translator && git clone -b v0.18.0 --depth 1 https://github.com/go-playground/universal-translator.git $GITHUB_WORKSPACE/src/github.com/go-playground/universal-translator
GOPATH=$GITHUB_WORKSPACE go get github.com/leodido/go-urn
GOPATH=$GITHUB_WORKSPACE go get golang.org/x/crypto/sha3
GOPATH=$GITHUB_WORKSPACE go get golang.org/x/text/language
GOPATH=$GITHUB_WORKSPACE go get github.com/go-playground/locales
# github.com/stretchr/testify
# newer version require newer go feature
rm -rf $GITHUB_WORKSPACE/src/github.com/stretchr/testify && git clone -b v1.6.1 --depth 1 https://github.com/stretchr/testify.git $GITHUB_WORKSPACE/src/github.com/stretchr/testify
GOPATH=$GITHUB_WORKSPACE go get github.com/davecgh/go-spew/spew
GOPATH=$GITHUB_WORKSPACE go get github.com/pmezard/go-difflib/difflib
GOPATH=$GITHUB_WORKSPACE go get gopkg.in/yaml.v3
GOPATH=$GITHUB_WORKSPACE make unittest
working-directory: src/github.com/qiniu/go-sdk
go-mod-test:
needs: 'go-path-test'
strategy:
fail-fast: false
max-parallel: 1
matrix:
go_version: ['1.11.x', '1.12.x', '1.13.x', '1.14.x', '1.15.x', '1.16.x', '1.17.x', '1.18.x', '1.19.x', '1.20.x']
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Run unit cases
run: |
make unittest
env:
GO111MODULE: 'on'