Merge pull request #509 from shogo82148/dependabot/npm_and_yarn/ts-je… #1281
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "test" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "releases/*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: action | |
- name: Set Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "action/go.mod" | |
- run: go version | |
- name: Set up the action | |
run: | | |
make all # build goveralls binaries | |
npm ci # install node modules | |
npm run build # build JavaScript | |
npm prune --production | |
working-directory: action | |
- name: archive | |
run: tar czvf action.tar.gz action | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: action | |
path: ./action.tar.gz | |
# run tests with Go that supports go.mod | |
test: | |
needs: | |
- build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-24.04 | |
- ubuntu-22.04 | |
- ubuntu-20.04 | |
- macos-14 # for arm64 | |
- macos-13 # for x64 | |
- macos-12 | |
- windows-2022 | |
- windows-2019 | |
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@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- run: go version | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: extract | |
run: tar xzvf action.tar.gz | |
- name: send coverage | |
uses: ./action/ | |
with: | |
parallel: true | |
flag-name: ${{ runner.os }}-Go-${{ matrix.go }} | |
shallow: true | |
finish: | |
needs: | |
- build | |
- test | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: action | |
- name: extract | |
run: tar xzvf action.tar.gz | |
- name: finalize parallel build | |
uses: ./action/ | |
with: | |
parallel-finished: true | |
shallow: true |