feat(disq): 添加 diskq 支持, 用于实现一个简单的本地队列 #160
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
on: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
services: | |
etcd: | |
image: gcr.io/etcd-development/etcd:v3.5.0 | |
ports: | |
- 2379:2379 | |
env: | |
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 | |
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379 | |
redis: | |
image: docker.io/redis:latest | |
ports: | |
- 6379:6379 | |
strategy: | |
matrix: | |
go-version: [1.21.x, 1.22.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@v3 | |
- name: Format | |
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi | |
- name: Vet | |
run: "go vet ./..." | |
- name: Install Staticcheck | |
uses: dominikh/staticcheck-action@v1 | |
with: | |
version: "latest" | |
install-go: false | |
cache-key: ${{ matrix.go-version }} | |
- name: Staticcheck | |
run: "staticcheck ./..." | |
- name: Test | |
run: "go test ./..." |