mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Go build and test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.18.x]
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- name: Set up Go ${{ matrix.node-version }}
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
run: make
|
|
|
|
- name: Test
|
|
run: make test
|
|
env:
|
|
GITHUB_TEST_USER: ${{ secrets._GITHUB_TEST_USER }}
|
|
GITHUB_TOKEN_ADMIN: ${{ secrets._GITHUB_TOKEN_ADMIN }}
|
|
GITHUB_TOKEN_PRIVATE: ${{ secrets._GITHUB_TOKEN_PRIVATE }}
|
|
GITHUB_TOKEN_PUBLIC: ${{ secrets._GITHUB_TOKEN_PUBLIC }}
|
|
GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}
|
|
GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }}
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18.x
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Check Code Formatting
|
|
run: find . -name "*.go" | while read line; do [ -z "$(gofmt -d "$line" | head)" ] || exit 1; done
|
|
|
|
- name: Check Security (vulnerable dependencies and insecure practices)
|
|
run: make secure
|