Skip to content

test depends-on

test depends-on #6

Workflow file for this run

on: [push, pull_request]
name: Unit Testing
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.15"
env:
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Extract dependent Pull Requests
uses: depends-on/depends-on-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Setup environment
run: |
# Changing into a different directory to avoid polluting go.sum with "go get"
cd "$(mktemp -d)"
go mod init unit_tests
# Pin to a version that Go v1.15 supports
go get golang.org/x/tools/cmd/[email protected]
- name: Run go vet
run: |
go vet ./...
- name: Run unit tests
run: |
go test -v ./...
- name: Check for formatting
run:
./script/format
check-all-dependencies-are-merged:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Check all dependent Pull Requests are merged
uses: depends-on/depends-on-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-unmerged-pr: true