Skip to content

Commit 5fc736d

Browse files
committed
CI: update rust workflow for testing
Signed-off-by: fahdfady <fahd.fady212@gmail.com>
1 parent 2b7ad0e commit 5fc736d

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

.github/workflows/release-rust.yml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Release Rust Crates
22

33
on:
4+
workflow_dispatch:
5+
pull_request:
46
push:
5-
branches: [ master, develop ]
6-
paths:
7-
- 'source/ports/rs_port/Cargo.toml'
8-
- 'source/ports/rs_port/inline/Cargo.toml'
7+
branches: [ master, develop, ]
8+
# branches: [ master, develop ]
9+
# paths:
10+
# - 'source/ports/rs_port/Cargo.toml'
11+
# - 'source/ports/rs_port/inline/Cargo.toml'
912

1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -15,15 +18,40 @@ env:
1518
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1619

1720
jobs:
18-
release:
19-
name: Release Rust Port
21+
test:
22+
name: Rust Port Tests
2023
runs-on: ubuntu-latest
2124
steps:
2225
- name: Check out the repo
2326
uses: actions/checkout@v4
2427
with:
2528
fetch-depth: 0
26-
- name: Release the port
29+
- name: install metacall
30+
run: curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
31+
- name: Install Rust
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
toolchain: stable
35+
override: true
36+
- name: Set up Rust
37+
uses: actions-rs/toolchain@v1
38+
with:
39+
toolchain: stable
40+
override: true
41+
- name: Build and test the port
42+
working-directory: source/ports/rs_port
2743
run: |
28-
cd source/ports/rs_port
29-
bash ./upload.sh
44+
cargo build --verbose
45+
cargo test --verbose
46+
# release:
47+
# name: Release Rust Port
48+
# runs-on: ubuntu-latest
49+
# steps:
50+
# - name: Check out the repo
51+
# uses: actions/checkout@v4
52+
# with:
53+
# fetch-depth: 0
54+
# - name: Release the port
55+
# run: |
56+
# cd source/ports/rs_port
57+
# bash ./upload.sh

0 commit comments

Comments
 (0)