2023-01-17 19:07:30 +08:00
|
|
|
name: test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
pull_request:
|
2023-01-31 09:35:21 +08:00
|
|
|
paths-ignore:
|
2023-03-03 02:16:57 +08:00
|
|
|
- '.github/*-releases.json'
|
2023-01-17 19:07:30 +08:00
|
|
|
|
|
|
|
jobs:
|
2023-01-31 03:30:44 +08:00
|
|
|
validate:
|
2023-01-17 19:07:30 +08:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-31 10:31:06 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
target:
|
|
|
|
- lint
|
|
|
|
- vendor-validate
|
|
|
|
- license-validate
|
2023-01-17 19:07:30 +08:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
-
|
|
|
|
name: Validate
|
|
|
|
uses: docker/bake-action@v2
|
|
|
|
with:
|
2023-01-31 10:31:06 +08:00
|
|
|
targets: ${{ matrix.target }}
|
2023-01-31 03:30:44 +08:00
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-01-17 19:07:30 +08:00
|
|
|
-
|
|
|
|
name: Test
|
|
|
|
uses: docker/bake-action@v2
|
|
|
|
with:
|
2023-01-23 08:38:28 +08:00
|
|
|
targets: test-coverage
|
2023-01-24 07:29:03 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-02-04 11:42:47 +08:00
|
|
|
-
|
|
|
|
name: Upload coverage
|
|
|
|
uses: codecov/codecov-action@v3
|
|
|
|
with:
|
|
|
|
file: ./coverage/clover.xml
|
2023-03-01 03:55:32 +08:00
|
|
|
flags: unit
|