Skip to content

Commit

Permalink
Ci fixes (#3)
Browse files Browse the repository at this point in the history
* updating conditions

* fixes

* Fix

* fix keyword
  • Loading branch information
Pacobart authored Nov 7, 2023
1 parent 9a96272 commit d55c6f8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
57 changes: 30 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,36 @@ permissions:
contents: read
on:
pull_request:
branches:
- main
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3

- name: generate test coverage
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
branches-ignore:
- master
- main

- name: check test coverage
uses: vladopajic/go-test-coverage@v2
with:
# Configure action using config file (option 1)
config: ./.testcoverage.yml
jobs:
test:
strategy:
matrix:
go: ['1.21']
os: [ubuntu-latest]
name: test and coverage
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4

# Configure action by specifying input parameters individually (option 2).
# If you are using config file you shouldn't use these parameters.
profile: cover.out
local-prefix: github.com/Pacobart/terraform-cloud-workspace-collector
#threshold-file: 80 # The minimum coverage that each file should have
#threshold-package: 80 # The minimum coverage that each package should have
#threshold-total: 95 # The minimum total coverage project should have
- name: generate test coverage
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...

- name: check test coverage
uses: vladopajic/go-test-coverage@v2
with:
# Configure action using config file (option 1)
config: ./.testcoverage.yml

# Configure action by specifying input parameters individually (option 2).
# If you are using config file you shouldn't use these parameters.
profile: cover.out
local-prefix: github.com/Pacobart/terraform-cloud-workspace-collector
#threshold-file: 80 # The minimum coverage that each file should have
#threshold-package: 80 # The minimum coverage that each package should have
#threshold-total: 95 # The minimum total coverage project should have
4 changes: 0 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# https://github.com/marketplace/actions/run-golangci-lint
name: golangci-lint
on:
push:
branches:
- master
- main
pull_request:

permissions:
Expand Down

0 comments on commit d55c6f8

Please sign in to comment.