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

Add skip-duplicate-actions action #1114

Merged
merged 3 commits into from
Mar 20, 2022
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
45 changes: 38 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,53 @@
name: Tests / Code Coverage
# Tests / Code Coverage workflow runs unit tests and uploads a code coverage report
# Tests & Code Coverage workflow runs unit tests and uploads a code coverage report
# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed

name: Tests & Code Coverage

on:
pull_request:
push:
branches:
- '**'

jobs:

should_run_test:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
-
id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true' # workflow-runs from outdated commits will be cancelled.
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
paths: '["**/*.go", "**/*.mod", "**/*.sum"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
-
name: Skipping test
run: echo Should I skip tests? ${{ steps.skip_check.outputs.should_skip }}

test:
needs: should_run_test
if: ${{ needs.should_run_test.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.4
-
name: Check out repository code
uses: actions/checkout@v2
-
name: Setup Golang
uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- name: Display go version
-
name: Display go version
run: go version
- name: Run all tests
-
name: Run all tests
run: go test -mod=readonly -timeout 30m -coverprofile=coverage.txt -tags='norace' -covermode=atomic `go list ./... | grep -v simapp`
- name: Codecov
-
name: Codecov
uses: codecov/codecov-action@v1.5.2
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#1071](https://github.com/osmosis-labs/osmosis/pull/1071) improve Dockerfile
* [#1095](https://github.com/osmosis-labs/osmosis/pull/1095) Fix authz being unable to use lockup & superfluid types.
* [#1105](https://github.com/osmosis-labs/osmosis/pull/1105) Add GitHub Actions to automatically push the osmosis Docker image
* [#1114](https://github.com/osmosis-labs/osmosis/pull/1114) Improve CI: remove duplicate runs of test worflow

### SDK fork updates

Expand Down