Skip to content

Commit

Permalink
github actions test
Browse files Browse the repository at this point in the history
github actions test
  • Loading branch information
oke11o committed Oct 23, 2023
1 parent f43b354 commit 4424bb5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 26 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/go.yaml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
run-unit-tests:
name: Unit Tests
concurrency:
group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
go-version: [1.20.x, 1.21.x]
os: [ubuntu, macOS]
env:
OS: ${{ matrix.os }}-latest
GO: ${{ matrix.go-version }}
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true

- name: Test
run: go test -race -coverprofile unit.txt -covermode atomic ./...

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
file: ./unit.txt
flags: unit,${{ matrix.os }},go-${{ matrix.go-version }}
name: unit
2 changes: 1 addition & 1 deletion .mapping.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
".github/workflows/go.yaml":"load/projects/pandora/.github/workflows/go.yaml",
".github/workflows/test.yml":"load/projects/pandora/.github/workflows/test.yml",
".gitignore":"load/projects/pandora/.gitignore",
".goxc.json":"load/projects/pandora/.goxc.json",
".travis.yml":"load/projects/pandora/.travis.yml",
Expand Down

0 comments on commit 4424bb5

Please sign in to comment.