mirror of
https://github.com/glauth/glauth.git
synced 2026-10-27 06:26:59 +00:00
2b45aefd74
- Moving from Travis CI to GitHub Actions
37 lines
988 B
YAML
37 lines
988 B
YAML
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- dev
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.15.x, 1.16.x]
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Updating packages database
|
|
run: sudo apt-get -qq update
|
|
- name: Install CLI Dependencies
|
|
run: sudo apt-get install -y ldap-utils oathtool go-bindata
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Make Bindata
|
|
run: make bindata
|
|
- name: Fetch Go dependencies
|
|
run: go get -t -v ./...
|
|
- name: Fail if a .go file hasn't been formatted with 'go fmt'
|
|
run: diff -u <(echo -n) <(gofmt -d ./)
|
|
- name: Full compile test
|
|
run: make all
|
|
- name: Output hashes to the build log
|
|
run: cat bin/*.sha256
|
|
- name: Integration test with compiled binary
|
|
run: make test
|