Skip to content

Commit

Permalink
fix: cleaned CI and fixed Code Coverage job, which was queued indefin…
Browse files Browse the repository at this point in the history
…itely (#5)
  • Loading branch information
EmilyMatt authored Jun 6, 2024
1 parent a4dd095 commit 44e0c3a
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 101 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/codecov.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/doc.yml

This file was deleted.

74 changes: 49 additions & 25 deletions .github/workflows/release.yml → .github/workflows/main.yml
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
Expand All @@ -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
Expand All @@ -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
9 changes: 8 additions & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ jobs:
- name: Check Rustfmt
run: cargo fmt --all --check

build-linux:
check-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build

check-tests:
needs:
- check-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@nextest
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![license](https://img.shields.io/github/license/falkordb/falkordb-rs.svg)](https://github.com/falkordb/falkordb-rs)
[![license](https://img.shields.io/badge/license-SSPL--1.0-green)](https://github.com/FalkorDB/falkordb-rs?tab=License-1-ov-file)
[![Release](https://img.shields.io/github/release/falkordb/falkordb-rs.svg)](https://github.com/falkordb/falkordb-rs/releases/latest)
[![Codecov](https://codecov.io/gh/falkordb/falkordb-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/falkordb/falkordb-rs)
[![Docs](https://img.shields.io/docsrs/:crate)](https://docs.rs/crate/falkordb/0.1.0)\
[![Docs](https://img.shields.io/docsrs/falkordb)](https://docs.rs/crate/falkordb)\
[![Forum](https://img.shields.io/badge/Forum-falkordb-blue)](https://github.com/orgs/FalkorDB/discussions)
[![Discord](https://img.shields.io/discord/1146782921294884966?style=flat-square)](https://discord.gg/ErBEqN9E)

Expand Down
2 changes: 2 additions & 0 deletions release-plz.toml
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

0 comments on commit 44e0c3a

Please sign in to comment.