Skip to content

Commit

Permalink
ci: run tests on push
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed May 19, 2024
1 parent 612e39c commit 1b908b9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run tests

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
go-version: [1.21]
os: [ubuntu-24.04, ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Enable the curl_proxy_http2 build tag
id: enable-curl_proxy_http2
if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macOS-latest' }}
run: echo "build-opts=--tags curl_proxy_http2" >> $GITHUB_OUTPUT

- name: Build
run: go build ${{ steps.enable-curl_proxy_http2.outputs.build-opts }} -v ./...

- name: Test
run: go test ${{ steps.enable-curl_proxy_http2.outputs.build-opts }} -v ./...

0 comments on commit 1b908b9

Please sign in to comment.