Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github/workflows: upgrade runs-on to ubuntu-20.04 and fix codecov flags #87

Merged
merged 5 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 53 additions & 22 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,106 @@
projects: *projects
target: auto
threshold: 10%
threshold: 1%
if_not_found: success
if_ci_failed: error
patch: *patch
only_pulls: true
target: auto
threshold: 10%

codecov:
allow_coverage_offsets: true

coverage:
precision: 1
round: down
range: "70...100"

status:
project:
default: off
Linux-1.13.x:
default: false
linux-1.13:
<<: *projects
Linux-1.14.x:
flags:
- "linux-1.13"
linux-1.14:
<<: *projects
Linux-1.15.x:
flags:
- "linux-1.14"
linux-1.15:
<<: *projects
macOS-1.13.x:
flags:
- "linux-1.15"
macos-1.13:
<<: *projects
macOS-1.14.x:
flags:
- "macos-1.13"
macos-1.14:
<<: *projects
macOS-1.15.x:
flags:
- "macos-1.14"
macos-1.15:
<<: *projects
flags:
- "macos-1.15"
patch:
default: off
Linux-1.13.x:
default: false
linux-1.13:
<<: *patch
Linux-1.14.x:
linux-1.14:
<<: *patch
Linux-1.15.x:
linux-1.15:
<<: *patch
macOS-1.13.x:
macos-1.13:
<<: *patch
macOS-1.14.x:
macos-1.14:
<<: *patch
macOS-1.15.x:
macos-1.15:
<<: *patch
changes: true
changes:
default:
base: auto
if_ci_failed: success
only_pulls: false
branches:
- codecov-flags
flags:
- "linux-1.13"
- "linux-1.14"
- "linux-1.15"
- "macos-1.13"
- "macos-1.14"
- "macos-1.15"

flags:
Linux-1.13.x:
linux-1.13:
paths:
- /
carryforward: true
Linux-1.14.x:
linux-1.14:
paths:
- /
carryforward: true
Linux-1.15.x:
linux-1.15:
paths:
- /
carryforward: true
macOS-1.13.x:
macos-1.13:
paths:
- /
carryforward: true
macOS-1.14.x:
macos-1.14:
paths:
- /
carryforward: true
macOS-1.15.x:
macos-1.15:
paths:
- /
carryforward: true

comment:
behavior: default
require_changes: true

github_checks:
annotations: true
31 changes: 23 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,43 @@ name: Test

on:
push:
branches: "*"
branches:
- master
tags:
- "v*"
pull_request:
branches: "*"

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.13.x, 1.14.x, 1.15.x ]
os: [ ubuntu-latest, macos-latest ]
env:
OS: ${{ matrix.os }}
GO_VERSION: ${{ matrix.go-version }}
os:
# https://github.com/actions/virtual-environments/blob/ubuntu20/20201210.0/images/linux/Ubuntu2004-README.md
- ubuntu-20.04
# https://github.com/actions/virtual-environments/blob/macOS-10.15/20201212.1/images/macos/macos-10.15-Readme.md
- macos-10.15
go-version:
- 1.13.x
- 1.14.x
- 1.15.x
runs-on: ${{ matrix.os }}

steps:
- name: Set flag environment variable
run: |
echo "OS=$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "GO_VERSION=$(echo ${{ matrix.go-version }} | cut -d. -f-2)" >> $GITHUB_ENV

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Install nvim binary
uses: rhysd/action-setup-vim@v1
Expand All @@ -40,5 +55,5 @@ jobs:
- uses: codecov/codecov-action@v1
with:
file: coverage.out
flags: ${{ runner.os }}-${{ matrix.go-version }}
flags: ${{ env.OS }}-${{ env.GO_VERSION }}
fail_ci_if_error: true