codecov: add threshold values #333
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
# This file is part of REANA. | |
# Copyright (C) 2022 CERN. | |
# | |
# REANA is free software; you can redistribute it and/or modify it | |
# under the terms of the MIT License; see LICENSE file for more details | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
go-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.18.X' | |
- name: Run test suite | |
run: make test | |
- name: Codecov Coverage | |
uses: codecov/codecov-action@v3 | |
go-lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.18.X' | |
- name: Run lint action | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
args: --enable=gofmt --enable=goimports | |
go-lines: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.18.X' | |
- name: Run golines | |
run: | | |
if [[ $(make golines | wc -l) -gt 2 ]]; then | |
echo "Golines would make the following changes:" | |
make golines | |
exit 1 | |
else | |
echo "No file exceeds the line size limit" | |
fi |