Skip to content

Commit

Permalink
fix: Update crates to avoid CVEs (#35)
Browse files Browse the repository at this point in the history
* Update crates to avoid CVEs

* Update thiserror and tokio

* Add concurrency group

* Move codecov to root dir, and create new coverage workflow, that will run on both PRs and main branch

* Add newline and remove needs keyword
  • Loading branch information
EmilyMatt authored Jul 24, 2024
1 parent 27dcdde commit fe1aa60
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 154 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Code Coverage

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

# Generate code coverage using llvm cov
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Generate Code Coverage
run: cargo llvm-cov nextest --all --features tokio --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
ports:
- 6379:6379
29 changes: 4 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

Expand All @@ -29,31 +33,6 @@ jobs:
- name: Build
run: cargo build

# 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
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Generate Code Coverage
run: cargo llvm-cov nextest --all --features tokio --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
ports:
- 6379:6379

# Ensure no clippy warnings
clippy:
runs-on: ubuntu-latest
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

Expand Down Expand Up @@ -41,20 +45,3 @@ jobs:
- 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
- name: Test
run: cargo nextest run --all --features tokio
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
Loading

0 comments on commit fe1aa60

Please sign in to comment.