diff --git a/.github/workflows/regression.yaml b/.github/workflows/regression.yaml new file mode 100644 index 0000000..0ea5d84 --- /dev/null +++ b/.github/workflows/regression.yaml @@ -0,0 +1,39 @@ +on: + push: + branches: + - master + paths: + - "**.go" + - "go.mod" + pull_request: + branches: + - "**" + +name: regression +jobs: + regression: + strategy: + matrix: + phase: [initialize, analyze] + runs-on: ubuntu-latest + env: + out: benchmark.out + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: 'stable' + - run: go mod download + - run: make bench-${{ matrix.phase }} | tee ${{ env.out }} + - uses: actions/cache@v3 + with: + path: ./cache + key: ${{ runner.os }}-benchmark-${{ matrix.phase }} + - uses: benchmark-action/github-action-benchmark@v1 + with: + tool: 'go' + output-file-path: ${{ env.out }} + external-data-json-path: ./cache/benchmark-data-${{ matrix.phase }}.json + fail-on-alert: true + github-token: ${{ secrets.GITHUB_TOKEN }} + comment-on-alert: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8942c26..42097e9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -74,26 +74,3 @@ jobs: go-version: 'stable' - run: go install -v github.com/palantir/go-license@latest - run: make license-verify - - regression: - runs-on: ubuntu-latest - env: - out: benchmark.out - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: 'stable' - - run: make bench | tee ${{ env.out }} - - uses: actions/cache@v3 - with: - path: ./cache - key: ${{ runner.os }}-benchmark - - uses: benchmark-action/github-action-benchmark@v1 - with: - tool: 'go' - output-file-path: ${{ env.out }} - external-data-json-path: ./cache/benchmark-data.json - fail-on-alert: true - github-token: ${{ secrets.GITHUB_TOKEN }} - comment-on-alert: true