Skip to content

Commit

Permalink
Merge pull request #1 from gfx/ci-cache
Browse files Browse the repository at this point in the history
[CI] cache cargo db in GHA
  • Loading branch information
gfx authored Dec 25, 2023
2 parents 000098d + 523a866 commit ac6f9dd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/rust-toolchain.toml') }}

- run: cargo build
- run: cargo test --verbose
17 changes: 13 additions & 4 deletions .github/workflows/dpz-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- name: Run run
run: cargo run

# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/rust-toolchain.toml') }}

- run: cargo build
- run: cargo run
env:
RSS_URL: https://dailyportalz.jp/feed/headline
BSKY_ID: ${{ secrets.BSKY_DBZ_BOT_ID }}
Expand Down
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.74"

0 comments on commit ac6f9dd

Please sign in to comment.