-
Notifications
You must be signed in to change notification settings - Fork 4
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
d94e7ce
commit 08a9395
Showing
7 changed files
with
1,094 additions
and
107 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 |
---|---|---|
|
@@ -5,50 +5,15 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Start Services | ||
run: | | ||
docker-compose up -d | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: rustfmt, clippy | ||
|
||
- uses: swatinem/[email protected] | ||
|
||
- name: Rust fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Run Clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-features | ||
|
||
- name: Build release | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --verbose --all --release --all-features | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
- name: Run Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --release --all-features | ||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
secrets: inherit |
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 |
---|---|---|
|
@@ -6,49 +6,8 @@ on: | |
- created | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Start services | ||
run: | | ||
docker-compose up -d | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
|
||
- uses: swatinem/[email protected] | ||
|
||
- name: Run fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Run Clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-features | ||
|
||
- name: Run Tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all | ||
|
||
- name: Build Release | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
publish_to_cargo: | ||
needs: build_and_test | ||
|
@@ -69,4 +28,4 @@ jobs: | |
with: | ||
command: publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
CARGO_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and Test | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
CODECOV_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Start Services | ||
run: | | ||
docker-compose up -d | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: rustfmt, clippy | ||
|
||
- uses: swatinem/[email protected] | ||
|
||
- name: Rust fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Run Clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-features | ||
|
||
- name: Install Tarpaulin | ||
run: cargo install cargo-tarpaulin | ||
|
||
- name: Run tests with coverage | ||
run: cargo tarpaulin --out Xml --output-dir coverage | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage/cobertura.xml |
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 |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
# IDES | ||
.vscode | ||
.idea | ||
.fleet | ||
.fleet | ||
/build_rs_cov.profraw | ||
coverage/ |
Oops, something went wrong.