mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
chore(ci): run go mod tidy on merges
This commit is contained in:
committed by
Łukasz Mierzwa
parent
ba14937193
commit
52eb7655b1
46
.github/workflows/go-mod-tidy.yml
vendored
Normal file
46
.github/workflows/go-mod-tidy.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Go mod tidy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- go.mod
|
||||
- go.sum
|
||||
- tools/*/go.mod
|
||||
- tools/*/go.sum
|
||||
|
||||
jobs:
|
||||
version-sync:
|
||||
name: Run go mod tidy
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.2
|
||||
|
||||
- name: Run go mod tidy
|
||||
run: |
|
||||
go mod tidy
|
||||
make tools-go-mod-tidy
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr
|
||||
uses: peter-evans/create-pull-request@v3.8.2
|
||||
with:
|
||||
token: ${{ secrets.GH_REPO_TOKEN }}
|
||||
author: "Łukasz Mierzwa <l.mierzwa@gmail.com>"
|
||||
commit-message: "fix(deps): run go mod tidy"
|
||||
branch: go-mod-tidy
|
||||
delete-branch: true
|
||||
title: "fix(deps): run go mod tidy"
|
||||
labels: automerge
|
||||
|
||||
- name: Check outputs
|
||||
run: |
|
||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
28
.github/workflows/test.yml
vendored
28
.github/workflows/test.yml
vendored
@@ -215,33 +215,6 @@ jobs:
|
||||
- name: Check for local changes
|
||||
run: git diff --exit-code
|
||||
|
||||
go-mod-tidy:
|
||||
name: Verify go.sum
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.2
|
||||
|
||||
- name: Mock web assets
|
||||
run: make mock-assets
|
||||
|
||||
- name: Fetch code
|
||||
run: go get -d -v ./cmd/karma
|
||||
|
||||
- name: Run go mod tidy
|
||||
run: go mod tidy
|
||||
|
||||
- name: Tidy tools
|
||||
run: make tools-go-mod-tidy
|
||||
|
||||
- name: Check for local changes
|
||||
run: git diff --exit-code
|
||||
|
||||
deps-js:
|
||||
name: Check JS dependencies
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -329,7 +302,6 @@ jobs:
|
||||
- lint-js
|
||||
- format-go
|
||||
- format-js
|
||||
- go-mod-tidy
|
||||
- deps-js
|
||||
- lint-versions
|
||||
- typescript
|
||||
|
||||
Reference in New Issue
Block a user