Skip to content

Commit 4ba0a0d

Browse files
Merge pull request #63 from reddevilmidzy/rook
하위 디렉터리 만들어서 Rust 코드 집어넣기
2 parents 06493b7 + 3bd3429 commit 4ba0a0d

File tree

11 files changed

+31
-15
lines changed

11 files changed

+31
-15
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ "main", "rook" ]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: [ "main", "rook" ]
88

99
permissions:
1010
contents: read
@@ -32,39 +32,46 @@ jobs:
3232
- name: Cache Cargo build
3333
uses: actions/cache@v3
3434
with:
35-
path: target
36-
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
35+
path: rook/target
36+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('rook/Cargo.lock') }}
3737

3838
- name: Check formatting
39+
working-directory: rook
3940
run: |
40-
cargo fmt -- --check > fmt-log.txt 2>&1
41+
# Redirecting log output to the parent directory to consolidate logs from multiple steps.
42+
cargo fmt -- --check > ../fmt-log.txt 2>&1
4143
FMT_STATUS=$?
42-
cat fmt-log.txt
44+
cat ../fmt-log.txt
4345
exit $FMT_STATUS
4446
4547
- name: Lint with Clippy
48+
working-directory: rook
4649
run: |
47-
cargo clippy -- -D warnings > clippy-log.txt 2>&1
50+
cargo clippy -- -D warnings > ../clippy-log.txt 2>&1
4851
CLIPPY_STATUS=$?
49-
cat clippy-log.txt
52+
cat ../clippy-log.txt
5053
exit $CLIPPY_STATUS
5154
5255
- name: Build
56+
working-directory: rook
5357
run: |
54-
cargo build --verbose > build-log.txt 2>&1
58+
cargo build --verbose > ../build-log.txt 2>&1
5559
BUILD_STATUS=$?
56-
cat build-log.txt
60+
cat ../build-log.txt
5761
exit $BUILD_STATUS
5862
5963
- name: Run tests
64+
working-directory: rook
6065
run: |
61-
cargo test --verbose > test-log.txt 2>&1
66+
cargo test --verbose > ../test-log.txt 2>&1
6267
TEST_STATUS=$?
63-
cat test-log.txt
68+
cat ../test-log.txt
6469
exit $TEST_STATUS
6570
6671
- name: Capture failure reason
6772
if: failure()
73+
# Switch to the repository root to access log files generated in earlier steps.
74+
working-directory: .
6875
run: |
6976
echo "" > full-log.txt
7077

.github/workflows/shuttle_deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ on:
44
push:
55
branches:
66
- main
7+
- rook
78
workflow_dispatch:
89

910
jobs:
1011
deploy:
1112
runs-on: ubuntu-latest
1213
steps:
14+
- uses: actions/checkout@v4
15+
1316
- uses: shuttle-hq/deploy-action@v2
1417
with:
1518
shuttle-api-key: ${{ secrets.SHUTTLE_API_KEY }}
1619
project-id: ${{ secrets.SHUTTLE_PROJECT_ID }}
20+
working-directory: rook

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/target
1+
rook/target
22

33
/.idea
4-
.shuttle*
5-
Secrets*.toml
4+
rook/.shuttle*
5+
rook/Secrets*.toml

rook/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/target
2+
3+
/.idea
4+
.shuttle*
5+
Secrets*.toml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)