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

Fix github actions for SingleStore and code coverage #138

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

muir
Copy link
Owner

@muir muir commented Jul 25, 2024

This fixes the SingleStore tests on Github Actions
It fixes codecov uploading

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.83%. Comparing base (4d6362e) to head (1b7b289).
Report is 1 commits behind head on main.

Files Patch % Lines
lssinglestore/singlestore.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #138   +/-   ##
=======================================
  Coverage   73.83%   73.83%           
=======================================
  Files          12       12           
  Lines        1261     1261           
=======================================
  Hits          931      931           
  Misses        267      267           
  Partials       63       63           
Flag Coverage Δ
go_tests 9.11% <0.00%> (ø)
mysql_tests 50.03% <0.00%> (ø)
pg_tests 51.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.github/workflows/s2.yml Fixed Show fixed Hide fixed
.github/workflows/mysql.yml Fixed Show fixed Hide fixed
.github/workflows/codecov.yml Fixed Show fixed Hide fixed
.github/workflows/pg.yml Fixed Show fixed Hide fixed
@@ -53,9 +57,11 @@
run: go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/muir/libschema/... ./lsmysql/... ./lssinglestore/...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
uses: codecov/codecov-action@v4

Check warning

Code scanning / Semgrep (reported by Codacy)

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Warning

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
@@ -60,9 +60,11 @@
run: go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/muir/libschema/... ./lsmysql/...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
uses: codecov/codecov-action@v4

Check warning

Code scanning / Semgrep (reported by Codacy)

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Warning

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
@@ -24,8 +24,10 @@
run: make calculate_coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
uses: codecov/codecov-action@v4

Check warning

Code scanning / Semgrep (reported by Codacy)

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Warning

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
@@ -58,8 +58,10 @@
run: go test -coverprofile=coverage.txt -covermode=atomic -coverpkg=github.com/muir/libschema/... ./lspostgres/...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
uses: codecov/codecov-action@v4

Check warning

Code scanning / Semgrep (reported by Codacy)

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Warning

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
@@ -29,7 +29,11 @@ jobs:

- name: sanity check using mysql client
run: |
mysql -u root -ptest -e "CREATE DATABASE libschematest" -h 127.0.0.1
mysql -u root -ptest -e "CREATE DATABASE libschematest partitions 2" -h 127.0.0.1
Copy link
Owner Author

Choose a reason for hiding this comment

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

I also adjust snapshots and minimal disk. Useful?

@@ -185,7 +185,7 @@ func (p *SingleStore) CreateSchemaTableIfNotExists(ctx context.Context, _ *inter
}
if schema != "" {
_, err := d.DB().ExecContext(ctx, fmt.Sprintf(`
CREATE DATABASE IF NOT EXISTS %s
CREATE DATABASE IF NOT EXISTS %s PARTITIONS 2
Copy link
Owner Author

Choose a reason for hiding this comment

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

Does it make sense that the database where store the set of migrations that have run should have 2 partitions in production?

It's only accessed during program startup and is very tiny.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, if it's really small, 2 partitions is the way to go (it does mean that database shouldn't be used for anything else), since that's the minimum singlestore supports today.

@muir muir changed the title try to fix S2 tests on github Fix github actions for SingleStore and code coverage Jul 25, 2024
@muir muir merged commit 78e71f3 into main Jul 25, 2024
31 checks passed
@muir muir deleted the actionsS2 branch July 25, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants