mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
chore(ci): move to github actions
This commit is contained in:
parent
5b349e5dc4
commit
4e0ce6e824
1 changed files with 61 additions and 0 deletions
61
.github/workflows/pull-request.yml
vendored
Normal file
61
.github/workflows/pull-request.yml
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
name: Main Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.15.x
|
||||||
|
- name: Lint
|
||||||
|
run: |
|
||||||
|
go get -u golang.org/lint/golint
|
||||||
|
golint -set_exit_status ./...
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version:
|
||||||
|
- 1.15.x
|
||||||
|
platform:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.15.x
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
go test ./... -coverprofile coverage.out
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.15.x
|
||||||
|
- name: Build
|
||||||
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
with:
|
||||||
|
version: v0.104.1
|
||||||
|
args: --snapshot --skip-publish --debug
|
||||||
Loading…
Add table
Add a link
Reference in a new issue