Skip to content

Commit

Permalink
Merge branch 'main' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Feb 5, 2024
2 parents 7b1bd28 + 6612579 commit ce88ccf
Show file tree
Hide file tree
Showing 9 changed files with 1,140 additions and 848 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
28 changes: 17 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: action

- name: Set Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'action/go.mod'
go-version-file: "action/go.mod"
- run: go version

- name: Set up the action
Expand All @@ -35,7 +35,7 @@ jobs:

- name: archive
run: tar czvf action.tar.gz action
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: action
path: ./action.tar.gz
Expand All @@ -50,22 +50,28 @@ jobs:
os:
- ubuntu-latest
- macos-latest
- macos-14 # for arm64
- macos-13 # for x64
- windows-latest
go:
- "1.11" # minumum version goveralls supports
- "oldstable"
- "stable"
exclude:
# Go 1.11 is not supported on Apple Silicon
- os: macos-14
go: "1.11"

runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version

- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: action
- name: extract
Expand All @@ -84,8 +90,8 @@ jobs:
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: action
- name: extract
Expand Down
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ GO=go
.PHONY: all linux darwin windows
all: linux darwin windows ## build all binaries

linux: bin/goveralls_linux_amd64 ## build Linux binary
linux: bin/goveralls_linux_amd64 bin/goveralls_linux_arm64 ## build Linux binary
bin/goveralls_linux_amd64: go.mod go.sum
mkdir -p bin
GOOS=linux GOARCH=amd64 $(GO) build -o bin/goveralls_linux_amd64 github.com/mattn/goveralls
bin/goveralls_linux_arm64: go.mod go.sum
mkdir -p bin
GOOS=linux GOARCH=arm64 $(GO) build -o bin/goveralls_linux_arm64 github.com/mattn/goveralls

darwin: bin/goveralls_darwin_amd64 ## build macOS binary
darwin: bin/goveralls_darwin_amd64 bin/goveralls_darwin_arm64 ## build macOS binary
bin/goveralls_darwin_amd64: go.mod go.sum
mkdir -p bin
GOOS=darwin GOARCH=amd64 $(GO) build -o bin/goveralls_darwin_amd64 github.com/mattn/goveralls
bin/goveralls_darwin_arm64: go.mod go.sum
mkdir -p bin
GOOS=darwin GOARCH=arm64 $(GO) build -o bin/goveralls_darwin_arm64 github.com/mattn/goveralls

windows: bin/goveralls_windows_amd64.exe ## build windows binary
windows: bin/goveralls_windows_amd64.exe bin/goveralls_windows_arm64.exe ## build windows binary
bin/goveralls_windows_amd64.exe: go.mod go.sum
mkdir -p bin
GOOS=windows GOARCH=amd64 $(GO) build -o bin/goveralls_windows_amd64.exe github.com/mattn/goveralls

bin/goveralls_windows_arm64.exe: go.mod go.sum
mkdir -p bin
GOOS=windows GOARCH=arm64 $(GO) build -o bin/goveralls_windows_arm64.exe github.com/mattn/goveralls
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
Add the following step snippet to your workflows.

```yaml
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '1.19'
go-version: "1.21"
- run: go test -v -coverprofile=profile.cov ./...

- uses: shogo82148/actions-goveralls@v1
Expand All @@ -32,28 +32,29 @@ Here is an example of matrix builds.
```yaml
on: [push, pull_request]
jobs:

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '1.19'
- '1.18'
- '1.17'
- '1.16'
- '1.15'
- '1.14'
- '1.13'
- '1.12'
- '1.11'
- "1.21"
- "1.20"
- "1.19"
- "1.18"
- "1.17"
- "1.16"
- "1.15"
- "1.14"
- "1.13"
- "1.12"
- "1.11"

steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: go test -v -coverprofile=profile.cov ./...

- name: Send coverage
Expand Down
26 changes: 13 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: 'actions-goveralls'
description: 'Coveralls GitHub Action with Go integration powered by mattn/goveralls'
author: 'ICHINOSE Shogo'
name: "actions-goveralls"
description: "Coveralls GitHub Action with Go integration powered by mattn/goveralls"
author: "ICHINOSE Shogo"
inputs:
github-token:
description: Coveralls uses this token to verify the posted coverage data on the repo and create a new check based on the results.
required: true
default: '${{ github.token }}'
default: "${{ github.token }}"
path-to-profile:
description: a path to your cover profile.
required: false
default: ''
default: ""
parallel:
description: 'Set to true if you are running parallel jobs, then use "parallel_finished: true" for the last action.'
required: false
Expand All @@ -21,29 +21,29 @@ inputs:
job-number:
description: "job number (DEPRECATED)"
required: false
default: '${{ strategy.job-index }}'
default: "${{ strategy.job-index }}"
deprecationMessage: "use flag-name instead"
flag-name:
description: 'Job flag name, e.g. "Unit", "Functional", or "Integration". Will be shown in the Coveralls UI.'
required: false
default: '${{ strategy.job-index }}'
default: "${{ strategy.job-index }}"
working-directory:
description: "working directory"
required: false
default: '.'
default: "."
ignore:
description: Comma separated files to ignore
required: false
default: ''
default: ""
shallow:
description: Shallow coveralls internal server errors
required: false
default: false

runs:
using: 'node16'
main: 'lib/main.js'
using: "node20"
main: "lib/main.js"

branding:
color: 'green'
icon: 'percent'
color: "green"
icon: "percent"
Loading

0 comments on commit ce88ccf

Please sign in to comment.