mirror of
https://github.com/square/certigo.git
synced 2024-04-21 12:32:40 +00:00
Set-up GH Actions for CI
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: v1.39
|
||||
only-new-issues: true
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Unit tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.17.x'
|
||||
- name: Build binary
|
||||
run: go build
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
integration:
|
||||
name: Integration tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.17.x'
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install cram
|
||||
run: pip install cram --user
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build binary
|
||||
run: go build
|
||||
- name: Run tests
|
||||
run: PATH=$PWD:$PATH cram -v tests/*.t
|
||||
Reference in New Issue
Block a user