-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: cleaned CI and fixed Code Coverage job, which was queued indefin…
…itely (#5)
- Loading branch information
Showing
7 changed files
with
61 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
name: Publish on crates.io | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: [ '*' ] | ||
branches: | ||
- main | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
@@ -16,25 +21,33 @@ jobs: | |
- name: Check Rustfmt | ||
run: cargo fmt --all --check | ||
|
||
# Make sure no unwanted licenses or yanked crates have slipped in | ||
deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
|
||
# Make sure the release's build works | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: cargo build | ||
- uses: taiki-e/install-action@nextest | ||
|
||
# Generate code coverage using llvm cov | ||
coverage: | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Populate test graph | ||
run: pip install falkordb && ./resources/populate_graph.py | ||
- name: Test | ||
run: cargo nextest run --all | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- uses: taiki-e/install-action@nextest | ||
- name: Generate Code Coverage | ||
run: cargo llvm-cov nextest --all --codecov --output-path codecov.json | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # Must be manually set | ||
files: codecov.json | ||
fail_ci_if_error: true | ||
services: | ||
falkordb: | ||
image: falkordb/falkordb:edge | ||
|
@@ -57,27 +70,38 @@ jobs: | |
- name: Doc | ||
run: cargo doc --all | ||
|
||
# Make sure no unwanted licenses or yanked crates have slipped in | ||
deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
|
||
# Actually publish to crates.io | ||
crates-io: | ||
needs: | ||
- fmt | ||
- deny | ||
- build | ||
- coverage | ||
- clippy | ||
- doc | ||
- deny | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Cargo Release | ||
run: cargo install cargo-release | ||
- name: Login | ||
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }} | ||
- name: Publish | ||
run: |- | ||
cargo release \ | ||
publish \ | ||
--all-features \ | ||
--allow-branch HEAD \ | ||
--no-confirm \ | ||
--no-verify \ | ||
--execute | ||
with: | ||
fetch-depth: 0 # Release-plz needs all the history | ||
|
||
- name: Verify main branch | ||
if: github.ref != 'refs/heads/main' | ||
run: | | ||
echo "This workflow can only run on the main branch." | ||
exit 1 | ||
- name: Run release-plz | ||
uses: MarcoIeni/[email protected] | ||
with: | ||
command: release-pr | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically generated by Github Actions | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Must be manually set |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[workspace] | ||
semver_check = false # disable API breaking changes checks, I suggest this becomes 'true' after we release 1.0 |