2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-09-20 11:05:58 +08:00
asynq/.github/workflows/build.yml
Mohammed Sohail e05f0b7196 ci/docs: update go versions
Squashed commit of the following:

commit de18fe9839
Author: Ken Hibino <ken.hibino7@gmail.com>
Date:   Sun Sep 17 19:35:33 2023 -0700

    Update README about supported Go versions

commit 714d62bb75
Author: Ken Hibino <ken.hibino7@gmail.com>
Date:   Sun Sep 17 19:26:16 2023 -0700

    Bound build to the latest two go versions
2023-12-10 09:46:45 -08:00

68 lines
1.5 KiB
YAML

name: build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.20.x, 1.21.x]
runs-on: ${{ matrix.os }}
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Build core module
run: go build -v ./...
- name: Build x module
run: cd x && go build -v ./... && cd ..
- name: Test core module
run: go test -race -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Test x module
run: cd x && go test -race -v ./... && cd ..
- name: Benchmark Test
run: go test -run=^$ -bench=. -loglevel=debug ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
build-tool:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.18.x]
runs-on: ${{ matrix.os }}
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Build tools module
run: cd tools && go build -v ./... && cd ..
- name: Test tools module
run: cd tools && go test -race -v ./... && cd ..