introduce gh-action
This commit is contained in:
parent
a34bf6435a
commit
dbde54c087
9 changed files with 133 additions and 222 deletions
21
.github/workflows/e2e.yml
vendored
Normal file
21
.github/workflows/e2e.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: E2E
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
types: [assigned, opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
|
||||
E2E:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: E2E
|
||||
run: docker-compose up --build --abort-on-container-exit
|
||||
working-directory: sshpiperd/e2e
|
||||
|
||||
48
.github/workflows/go.yml
vendored
Normal file
48
.github/workflows/go.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
types: [assigned, opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ^1.14
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Dep
|
||||
run: |
|
||||
set -e
|
||||
|
||||
go version
|
||||
go get -u golang.org/x/lint/golint
|
||||
go get -u github.com/gordonklaus/ineffassign
|
||||
|
||||
sudo apt install -y libpam0g-dev
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -e
|
||||
|
||||
go build -tags pam -o sshpiperd
|
||||
./sshpiperd version
|
||||
working-directory: sshpiperd
|
||||
|
||||
- name: lint
|
||||
run: ./lint.sh
|
||||
|
||||
- name: Test
|
||||
run: go test -v .
|
||||
working-directory: sshpiperd
|
||||
32
.github/workflows/snap.yaml
vendored
Normal file
32
.github/workflows/snap.yaml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Snap package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
snap:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Dep
|
||||
env:
|
||||
SNAP_SECRET: ${{ secrets.snap }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
sudo snap install snapcraft --classic
|
||||
echo $SNAP_SECRET | base64 -d > secret
|
||||
snap run snapcraft login --with secret
|
||||
|
||||
- name: snap
|
||||
run: docker-compose up --build --abort-on-container-exit
|
||||
working-directory: sshpiperd/snap
|
||||
|
||||
- name: push
|
||||
run: snap run snapcraft push *.snap
|
||||
working-directory: sshpiperd/snap
|
||||
Loading…
Add table
Add a link
Reference in a new issue