mirror of
https://github.com/square/certigo.git
synced 2024-04-21 12:32:40 +00:00
Merge pull request #245 from square/mbyczkowski/add-gha
Configure GH Actions
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
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
---
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- '1.16.x'
|
||||
|
||||
install:
|
||||
- pip install cram --user
|
||||
|
||||
before_script:
|
||||
- go vet -v ./...
|
||||
|
||||
script:
|
||||
- GOOS=linux GOARCH=amd64 go build -o certigo-linux-amd64
|
||||
- GOOS=darwin GOARCH=amd64 go build -o certigo-darwin-amd64
|
||||
- GOOS=windows GOARCH=amd64 go build -o certigo-windows-amd64.exe
|
||||
- go test -v ./...
|
||||
- ln -s certigo-linux-amd64 certigo
|
||||
- PATH=$PWD:$PATH cram -v tests/*.t
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
# mbyczkowski's OAuth token
|
||||
secure: SJqQjZ+4TT/CqAPy/7Z/Y1kIoYQt1GMw/kVkh6QpYqTaknqnWmNlwn/GdMATdiFo5X4GsPoE9euc+z5E9FeVgOlxypOzf/H0K2eV5YRitjQYrtzjVCkCnWt6AIOBRHWF31+mtkk2kbG7k0N/cj6GOpj93sX2Bh8+zM3O86SEgC2bipGTuNkR+PJh09Euthe1C/zlELyyo1Hg/rfnD8mRmPK7hSRj0FTlJLCkxHC7ou9r6FMyxC25uRKg7r3bocOOYUyDstZRid5HnKbxhfPhCAE+xHdLuH3+iQdAS0g0TYIfajGEm4nrgCWlMB7hqKcP5Ob3YFNdlmAp/61y2tBRZlk5S3bjU4XnEfjxN7wmAs0Em+SAH9R2U1hl4fDOwxXoBxDuKpu1FH598Q4xA2bfZrnzNnzVXvRTjSAb4a0CzwU8wRuftqCeGWrylaDPRSVVAtTUyukEoV/3KBfZaSCE5xXI7uu2IsqG4SLmxod1X/EdamM16ZkUzrsgtCJGUIjNcOQw1lro9PV1A5oac02hkEwW87N5OY36abTlKhkbpGZJvkN21UF4HUJM/W1UCUMYNZ7hOwU3H2kWZrmWHSXfRvjwJxwqXYVEX4MTULccV8JcPq4fRywV+uCkT/aGEzNXLv++9r7Ut9aqGuQi6Aee2SjtjRBVXeWKpCJMUNB8fow=
|
||||
file:
|
||||
- certigo-linux-amd64
|
||||
- certigo-darwin-amd64
|
||||
- certigo-windows-amd64.exe
|
||||
skip_cleanup: true
|
||||
draft: true
|
||||
on:
|
||||
repo: square/certigo
|
||||
tags: true
|
||||
Reference in New Issue
Block a user