Skip to content

Create dep-auto-merge.yml #76

Create dep-auto-merge.yml

Create dep-auto-merge.yml #76

Workflow file for this run

name: 'app-pipeline'
on:
push:
pull_request:
jobs:
test:
strategy:
matrix:
go-version: [1.18.x]
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go dependencies
id: cache-go-dependencies
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
.tmp/
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Install Go dependencies
if: steps.cache-go-dependencies.outputs.cache-hit != 'true'
run: make bootstrap
- name: Run Static Analysis
run: make lint
- name: Run Tests
run: make test
build-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Cache Go dependencies
id: package-cache-go-dependencies
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
.tmp/
key: ${{ runner.os }}-go-prod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-prod-
- name: Install dependencies
if: steps.package-cache-go-dependencies.outputs.cache-hit != 'true'
run: make bootstrap
- name: Build snapshot artifacts
run: make ci-build-snapshot-packages
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist
test-linux-artifacts:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: dist
- name: Test Linux run
run: make ci-test-linux-run
- name: Test Docker run
run: make ci-plugs-out-test
test-mac-artifacts:
needs: build-artifacts
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: dist
- name: Test Darwin run
run: make ci-test-mac-run
test-windows-artifacts:
needs: build-artifacts
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: dist
- name: Test Windows run
run: make ci-test-windows-run
release:
needs: [test, build-artifacts, test-linux-artifacts, test-mac-artifacts, test-windows-artifacts]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Cache Go dependencies
id: release-cache-go-dependencies
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
.tmp/
key: ${{ runner.os }}-go-prod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-prod-
- name: Install dependencies
if: steps.release-cache-go-dependencies.outputs.cache-hit != 'true'
run: make bootstrap
- name: Publish GitHub release
run: make ci-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}