-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a248c45
commit a9de1ec
Showing
8 changed files
with
100 additions
and
53 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -115,7 +115,6 @@ jobs: | |
publish-crates-check: | ||
name: Publish Check | ||
needs: | ||
- validate-title | ||
- lockfile | ||
- pre-commit | ||
- commitlint | ||
|
@@ -139,7 +138,6 @@ jobs: | |
cargo-verifications: | ||
name: Cargo verifications | ||
needs: | ||
- validate-title | ||
- lockfile | ||
- pre-commit | ||
- commitlint | ||
|
@@ -167,10 +165,10 @@ jobs: | |
- name: Lint project | ||
run: make lint | ||
|
||
test-coverage: | ||
test: | ||
needs: | ||
- cargo-verifications | ||
name: Test & Coverage | ||
name: Test | ||
runs-on: ubuntu-latest | ||
env: | ||
NATS_URL: nats://127.0.0.1:4222 | ||
|
@@ -187,6 +185,8 @@ jobs: | |
- name: Install Rust | ||
uses: ./.github/actions/setup-rust | ||
with: | ||
toolchain: ${{ env.RUST_NIGHTLY_VERSION }} | ||
|
||
- name: Start Nats | ||
run: | | ||
|
@@ -195,24 +195,54 @@ jobs: | |
- name: Run tests | ||
run: make test | ||
|
||
- name: Stop Nats | ||
if: always() | ||
run: make stop/nats | ||
|
||
test-coverage: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
needs: | ||
- cargo-verifications | ||
name: Test & Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
NATS_URL: nats://127.0.0.1:4222 | ||
NATS_ADMIN_PASS: secret | ||
NATS_PUBLIC_PASS: secret | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create .env file with NATS environment variables | ||
run: | | ||
echo "NATS_URL=${{ env.NATS_URL }}" > .env | ||
echo "NATS_ADMIN_PASS=${{ env.NATS_ADMIN_PASS }}" >> .env | ||
echo "NATS_PUBLIC_PASS=${{ env.NATS_PUBLIC_PASS }}" >> .env | ||
- name: Install Rust | ||
uses: ./.github/actions/setup-rust | ||
with: | ||
toolchain: ${{ env.RUST_NIGHTLY_VERSION }} | ||
target: x86_64-unknown-linux-gnu,wasm32-unknown-unknown | ||
cache: false | ||
|
||
- name: Start Nats | ||
run: | | ||
make start/nats | ||
- name: Install dependencies | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libclang-dev curl | ||
- name: Install Tarpaulin (Pre-built Binary) | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: taiki-e/cache-cargo-install-action@v2 | ||
with: | ||
tool: [email protected] | ||
|
||
- name: Generate Code Coverage | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
run: make coverage | ||
|
||
- name: Upload to codecov.io | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
name: codecov-data-systems | ||
|
@@ -317,36 +347,31 @@ jobs: | |
|
||
release: | ||
name: Create Release with Knope | ||
if: (github.head_ref == 'changeset/release-main' && github.event.pull_request.merged == true) || github.event_name | ||
== 'workflow_dispatch' | ||
if: >- | ||
(github.event_name == 'push' && | ||
github.ref == 'refs/heads/main' && | ||
contains(github.event.head_commit.message, 'ci(release): Preparing')) || | ||
github.event_name == 'workflow_dispatch' | ||
needs: | ||
- test-coverage | ||
- test | ||
- build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
actions: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4.1.6 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4.1.7 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
merge-multiple: true | ||
|
||
- name: List Artifacts | ||
run: ls -R artifacts | ||
|
||
- name: Cache Artifacts | ||
uses: actions/cache@v4 | ||
with: | ||
path: artifacts | ||
key: ${{ runner.os }}-artifacts-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-artifacts- | ||
- name: Run Knope Action | ||
uses: knope-dev/[email protected] | ||
with: | ||
|
@@ -355,31 +380,4 @@ jobs: | |
- name: Knope Release | ||
run: knope release | ||
env: | ||
github-token: ${{ secrets.REPO_TOKEN }} | ||
|
||
publish-crates: | ||
name: Publish on Crates.io | ||
needs: | ||
- publish-crates-check | ||
- release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore Artifacts Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: artifacts | ||
key: ${{ runner.os }}-artifacts-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-artifacts- | ||
- name: Install Rust Toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
|
||
- name: Publish Crate | ||
uses: FuelLabs/publish-crates@v1 | ||
with: | ||
publish-delay: 60000 | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} |
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,33 @@ | ||
name: Publish on Crates.io | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
CI: true | ||
RUST_VERSION: 1.79.0 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish-crates: | ||
name: Publish on Crates.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
target: x86_64-unknown-linux-gnu,wasm32-unknown-unknown | ||
|
||
- name: Publish Crate | ||
uses: katyo/publish-crates@v2 | ||
with: | ||
publish-delay: 60000 | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
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
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