name: CI

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  tests:
    strategy:
      matrix:
        os: ["windows-2019", "ubuntu-18.04", "macos-10.15"]
    runs-on: ${{ matrix.os }}
    name: Tests (${{ matrix.os }})
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2-beta
        with:
          go-version: '^1.13.1'
      - name: Tests
        run: "go test -race -coverprofile='coverage.txt' -covermode=atomic -v ./gpg/"
      - uses: codecov/codecov-action@v1.0.5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
  static_analysis:
    runs-on: ubuntu-18.04
    name: Run static analysis and linting
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2-beta
        with:
          go-version: '^1.13.1'
      - name: Go fmt
        run: diff -u <(echo -n) <(gofmt -d -s *.go gpg/)
      - name: Go vet
        run: env GO111MODULE=on go vet ./...
      - name: Staticcheck
        run: go run honnef.co/go/tools/cmd/staticcheck -checks 'all,-ST1000' ./...

name: CI

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  tests:
    strategy:
      matrix:
        os: ["windows-2019", "ubuntu-18.04", "macos-10.15"]
    runs-on: ${{ matrix.os }}
    name: Tests (${{ matrix.os }})
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2-beta
        with:
          go-version: '^1.13.1'
      - name: Tests
        run: "go test -race -coverprofile='coverage.txt' -covermode=atomic -v ./gpg/"
      - uses: codecov/codecov-action@v1.0.5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
  static_analysis:
    runs-on: ubuntu-18.04
    name: Run static analysis and linting
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2-beta
        with:
          go-version: '^1.13.1'
      - name: Go fmt
        run: diff -u <(echo -n) <(gofmt -d -s *.go gpg/)
      - name: Go vet
        run: env GO111MODULE=on go vet ./...
      - name: Staticcheck
        run: go run honnef.co/go/tools/cmd/staticcheck -checks 'all,-ST1000' ./...
      - name: Gosec
        run: go run github.com/securego/gosec/cmd/gosec -exclude=G104 ./...
Add Gosec to the test pipeline
Add Gosec to the test pipeline

Error 104 is ignore for now
