Skip to content

Commit

Permalink
update github CI flow
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas committed Jul 28, 2022
1 parent 377bce1 commit 62ee8b4
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/echo-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,33 @@ on:
- '_fixture/**'
- '.github/**'
- 'codecov.yml'
workflow_dispatch:

jobs:
test:
env:
latest: '1.17'
latest: '1.18'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ['1.14', '1.15', '1.16', '1.17']
go: ['1.16', '1.17', '1.18']
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}

- name: Run static checks
if: matrix.go == env.latest && matrix.os == 'ubuntu-latest'
run: |
go get -u honnef.co/go/tools/cmd/staticcheck@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck -tests=false ./...
- name: Run Tests
Expand All @@ -53,36 +54,36 @@ jobs:
- name: Upload coverage to Codecov
if: success() && matrix.go == env.latest && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
benchmark:
needs: test
strategy:
matrix:
os: [ubuntu-latest]
go: [1.17]
go: [1.18]
name: Benchmark comparison ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Checkout Code (Previous)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}
path: previous

- name: Checkout Code (New)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: new

- name: Install Dependencies
run: go get -v golang.org/x/perf/cmd/benchstat
run: go install golang.org/x/perf/cmd/benchstat@latest

- name: Run Benchmark (Previous)
run: |
Expand Down

0 comments on commit 62ee8b4

Please sign in to comment.