-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from atc0005/i165-add-missing-workflows
Add missing GitHub Actions Workflows for GH-165
- Loading branch information
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Copyright 2020 Adam Chalkley | ||
# | ||
# https://github.com/atc0005/elbow | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Lint and Build using Makefile | ||
|
||
# Run builds for Pull Requests (new, updated) | ||
# `synchronized` seems to equate to pushing new commits to a linked branch | ||
# (whether force-pushed or not) | ||
on: | ||
#push: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
lint_code_with_makefile: | ||
name: Lint codebase using Makefile | ||
runs-on: ubuntu-latest | ||
# Default: 360 minutes | ||
timeout-minutes: 10 | ||
container: | ||
image: "index.docker.io/golang:latest" | ||
|
||
steps: | ||
- name: Print go version | ||
run: go version | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
|
||
# bsdmainutils provides "column" which is used by the Makefile | ||
- name: Install Ubuntu packages | ||
run: apt-get update && apt-get install -y --no-install-recommends make gcc bsdmainutils | ||
|
||
- name: Install Go linting tools | ||
run: make lintinstall | ||
|
||
- name: Run Go linting tools using project Makefile | ||
run: make linting | ||
|
||
build_code_with_makefile: | ||
name: Build codebase using Makefile | ||
runs-on: ubuntu-latest | ||
# Default: 360 minutes | ||
timeout-minutes: 10 | ||
container: | ||
image: "index.docker.io/golang:latest" | ||
|
||
steps: | ||
- name: Print go version | ||
run: go version | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
|
||
# bsdmainutils provides "column" which is used by the Makefile | ||
- name: Install Ubuntu packages | ||
run: apt-get update && apt-get install -y --no-install-recommends make gcc bsdmainutils | ||
|
||
- name: Build using project Makefile | ||
run: make all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2020 Adam Chalkley | ||
# | ||
# https://github.com/atc0005/elbow | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Quick Validation | ||
|
||
# Run builds for Pull Requests (new, updated) | ||
# `synchronized` seems to equate to pushing new commits to a linked branch | ||
# (whether force-pushed or not) | ||
on: | ||
push: | ||
|
||
jobs: | ||
lint_and_test_code: | ||
name: Lint and test using latest stable container | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
container: | ||
image: index.docker.io/atc0005/go-ci:go-ci-lint-only | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
|
||
- name: Run golangci-lint using repo-provided config file settings | ||
run: golangci-lint run -v | ||
|
||
- name: Run all tests | ||
run: go test -mod=vendor -v ./... |