php-fpm-exporter/.github/workflows/test.yml
dependabot[bot] 4ad2ef49c6
chore(deps): bump goreleaser/goreleaser-action from 2.6.0 to 2.7.0 (#165)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-28 12:15:04 +10:00

83 lines
1.7 KiB
YAML

name: Test
on:
pull_request_target:
workflow_dispatch:
push:
branches:
- master
- 'releases/*'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.14
id: go
- name: Checkout
uses: actions/checkout@v2.3.4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2.5.2
with:
version: v1.32
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2.1.3
with:
go-version: ^1.15.0
id: go
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Test
run: go test -coverprofile cover.out ./...
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
image-scan:
name: Image Scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v2.1.3
with:
go-version: ^1.15.0
id: go
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.7.0
with:
version: latest
args: release --rm-dist --skip-validate --skip-publish
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Scan image
uses: anchore/scan-action@v2.0.4
with:
image: "hipages/php-fpm_exporter:latest"
fail-build: true