From ff5529524983130e7188d517e134cf7d14c9f319 Mon Sep 17 00:00:00 2001 From: Ben Hale Date: Wed, 23 Sep 2020 09:50:33 -0700 Subject: [PATCH] Test This change adds a Test GitHub Action for running Golang tests against the repository. Signed-off-by: Ben Hale --- .github/workflows/minimal-labels.yml | 11 +++-------- .github/workflows/synchronize-labels.yml | 4 ++-- .github/workflows/test.yml | 25 ++++++++++++++++++++++++ .github/workflows/update-release.yml | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/minimal-labels.yml b/.github/workflows/minimal-labels.yml index 4f6ed72..a4bf1a6 100644 --- a/.github/workflows/minimal-labels.yml +++ b/.github/workflows/minimal-labels.yml @@ -1,11 +1,6 @@ name: Minimal Labels "on": - pull_request: - types: - - labeled - - unlabeled - - opened - - synchronize + pull_request: {} jobs: semver: name: SemVer @@ -13,7 +8,7 @@ jobs: - ubuntu-latest steps: - name: Require Labels - uses: mheap/github-action-required-labels@v1.1.0 + uses: mheap/github-action-required-labels@v1 with: count: 1 labels: 'semver: major,semver: minor,semver: patch' @@ -24,7 +19,7 @@ jobs: - ubuntu-latest steps: - name: Require Labels - uses: mheap/github-action-required-labels@v1.1.0 + uses: mheap/github-action-required-labels@v1 with: count: 1 labels: 'type: bug,type: dependency-upgrade,type: documentation,type: enhancement,type: question,type: task' diff --git a/.github/workflows/synchronize-labels.yml b/.github/workflows/synchronize-labels.yml index 7857b72..a6bb509 100644 --- a/.github/workflows/synchronize-labels.yml +++ b/.github/workflows/synchronize-labels.yml @@ -12,8 +12,8 @@ jobs: - ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.3.2 + uses: actions/checkout@v2 - name: Label Syncer - uses: micnncim/action-label-syncer@v1.1.0 + uses: micnncim/action-label-syncer@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..94579d2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Test +"on": + pull_request: {} +jobs: + test: + name: Test + runs-on: + - ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Go environment + uses: actions/setup-go@v2 + with: + go-version: "1.15" + - name: Cache + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + path: ~/go/pkg/mod + restore-keys: ${{ runner.os }}-go- + - name: Install richgo + run: go get -u github.com/kyoh86/richgo + - name: Test + run: RICHGO_FORCE_COLOR=1 richgo test ./... diff --git a/.github/workflows/update-release.yml b/.github/workflows/update-release.yml index 5a99bad..0e1ba12 100644 --- a/.github/workflows/update-release.yml +++ b/.github/workflows/update-release.yml @@ -10,6 +10,6 @@ jobs: - ubuntu-latest steps: - name: Release Drafter - uses: release-drafter/release-drafter@v5.11.0 + uses: release-drafter/release-drafter@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}