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

ci: run most tests all the time, again #3390

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 1 addition & 6 deletions .github/workflows/benchmark-master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ on:
push:
branches:
- master
paths:
- contribs/**/*.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if we merge a single md change, we need to run the benchmarks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can make this **/*.go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, this benchmark runs in like < 1 minute now

Why do you care about the number of CI checks being executed, especially on master? Personally, I only care about the time it takes for the whole CI to run. (It's not rhetorical, it's a genuine question to understand if I'm missing something.)

- gno.land/**/*.go
- gnovm/**/*.go
- tm2/**/*.go

permissions:
# deployments permission to deploy GitHub pages website
Expand All @@ -22,7 +17,7 @@ env:
jobs:
benchmarks:
if: ${{ github.repository == 'gnolang/gno' }}
runs-on: [ self-hosted, Linux, X64, benchmarks ]
runs-on: [self-hosted, Linux, X64, benchmarks]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- master
pull_request:
paths:
- contribs/**
workflow_dispatch:

jobs:
Expand All @@ -26,14 +24,14 @@ jobs:
run: |
contribs_programs=$(ls -d contribs/*/ | cut -d/ -f2)
versions_map="{"

for p in $contribs_programs; do
# Fetch the go version of the contribs entry, and save it
# to a versions map we can reference later in the workflow
go_version=$(grep "^go [0-9]" contribs/$p/go.mod | cut -d ' ' -f2)
versions_map="$versions_map\"$p\":\"$go_version\","
done

# Close out the JSON
versions_map="${versions_map%,}"
versions_map="$versions_map}"
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- master
pull_request:
paths:
- gnovm/**/*.gno
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we not run them for just these changes?

What does a change in any other part of the codebase have to do with the examples? I'd like to see real examples of this issue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2491 was green in the PR, but was red after being merged, because a txtar test was no longer correct.

- examples/**/*.gno

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -80,7 +77,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ "1.22.x" ]
go-version: ["1.22.x"]
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/gnovm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- master
pull_request:
paths:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say find the dependency, and add it as a path requirement

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say just about the entire repository; maybe an exception for tm2/*.

- gnovm/**
- tm2/** # GnoVM has a dependency on TM2 types
workflow_dispatch:

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
branches:
- master
pull_request:
paths:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are working in a monorepository because we have many different components that depend on each other and a codebase that will likely still be in turmoil for the upcoming years. Even remaining on the "simplest" level of breakages, API changes, components in misc/ and contribs/ like autocounterd, loop, gnodev, and gnogenesis depend on the APIs exposed by the many packages in gno.land, gnovm and tm2. If any of these change, and the build breaks on any of these components, the CI should be red, and the issue fixed immediately in the same PR as the API change.

But aside from API breakages, components can change in all kinds of subtle ways that their usages elsewhere might not expect. That's why we have tests to ensure that things keep working and behaving as we expect them, and why if tm2 changes, the entire repository needs to be tested, and I don't see many ways out of that.

- misc/**
workflow_dispatch:

jobs:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/mod-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:
branches:
- master
paths:
- '**/*.go'
- 'go.mod'
- 'go.sum'
- "**/*.go"
- "go.mod"
- "go.sum"
pull_request:
paths:
- '**/*.go'
- 'go.mod'
- 'go.sum'
- "**/*.go"
- "go.mod"
- "go.sum"
workflow_dispatch:

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- master
pull_request:
paths:
- go.mod
- go.sum
- tm2/**
thehowl marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

Expand Down
Loading