Skip to content

Commit 4cceaa3

Browse files
authored
Merge pull request #1288 from JohnTitor/sha-pin-actions
chore: sha-pin actions
2 parents db79f3c + eabe586 commit 4cceaa3

File tree

3 files changed

+28
-35
lines changed

3 files changed

+28
-35
lines changed

.github/workflows/ci-nightly.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818

1919
- name: Install Rust (${{ matrix.version }})
20-
uses: actions-rust-lang/setup-rust-toolchain@v1.15.4
20+
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
2121
with:
2222
toolchain: ${{ matrix.version }}
2323

@@ -26,6 +26,7 @@ jobs:
2626
sudo apt-get update
2727
sudo apt-get -y install sqlite3
2828
sudo apt-get -y install libpq-dev
29+
sudo apt-get -y install redis-server
2930
3031
- name: Install DB CLI tools
3132
run: |
@@ -40,15 +41,17 @@ jobs:
4041
chmod a+rwx ./todo.db
4142
sqlx migrate run --source=./basics/todo/migrations
4243
44+
- name: Start Redis
45+
run: |
46+
if ! redis-cli ping; then
47+
redis-server --daemonize yes
48+
fi
49+
redis-cli ping
50+
4351
- name: cargo check
4452
run: cargo check --workspace --bins --examples --tests
4553
timeout-minutes: 30
4654

47-
- name: Start Redis
48-
uses: supercharge/redis-github-action@v2
49-
with:
50-
redis-version: 6
51-
5255
- name: cargo test
5356
run: cargo test --workspace --all-features --no-fail-fast --exclude=db-diesel -- --nocapture
5457
timeout-minutes: 30
@@ -64,7 +67,7 @@ jobs:
6467
timeout-minutes: 10
6568

6669
- name: Install cargo-ci-cache-clean
67-
uses: taiki-e/install-action@v2.75.10
70+
uses: taiki-e/install-action@85b24a67ef0c632dfefad70b9d5ce8fddb040754 # v2.75.10
6871
with:
6972
tool: cargo-ci-cache-clean
7073

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323

2424
- name: Install Rust (${{ matrix.version }})
25-
uses: actions-rust-lang/setup-rust-toolchain@v1.15.4
25+
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
2626
with:
2727
toolchain: ${{ matrix.version }}
2828

@@ -31,6 +31,7 @@ jobs:
3131
sudo apt-get update
3232
sudo apt-get -y install sqlite3
3333
sudo apt-get -y install libpq-dev
34+
sudo apt-get -y install redis-server
3435
3536
- name: Install DB CLI tools
3637
run: |
@@ -45,15 +46,17 @@ jobs:
4546
chmod a+rwx ./todo.db
4647
sqlx migrate run --source=./basics/todo/migrations
4748
49+
- name: Start Redis
50+
run: |
51+
if ! redis-cli ping; then
52+
redis-server --daemonize yes
53+
fi
54+
redis-cli ping
55+
4856
- name: cargo check
4957
run: cargo check --workspace --bins --examples --tests
5058
timeout-minutes: 30
5159

52-
- name: Start Redis
53-
uses: supercharge/redis-github-action@v2
54-
with:
55-
redis-version: 6
56-
5760
- name: cargo test
5861
run: cargo test --workspace --all-features --no-fail-fast --exclude=db-diesel -- --nocapture
5962
timeout-minutes: 30
@@ -69,7 +72,7 @@ jobs:
6972
timeout-minutes: 10
7073

7174
- name: Install cargo-ci-cache-clean
72-
uses: taiki-e/install-action@v2.75.10
75+
uses: taiki-e/install-action@85b24a67ef0c632dfefad70b9d5ce8fddb040754 # v2.75.10
7376
with:
7477
tool: cargo-ci-cache-clean
7578

.github/workflows/clippy-fmt.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1414

1515
- name: Install Rust
16-
uses: actions-rust-lang/setup-rust-toolchain@v1.15.4
16+
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
1717
with:
1818
toolchain: stable
1919
components: rustfmt
2020

2121
- name: rustfmt
22-
uses: actions-rust-lang/rustfmt@v1
22+
uses: actions-rust-lang/rustfmt@4066006ec54a31931b9b1fddfd38f2fdf2d27143 # v1.1.2
2323

2424
clippy:
2525
name: clippy check
@@ -30,27 +30,14 @@ jobs:
3030
CARGO_INCREMENTAL: false
3131

3232
steps:
33-
- uses: actions/checkout@v6
33+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3434

3535
- name: Install Rust
36-
uses: actions-rust-lang/setup-rust-toolchain@v1.15.4
36+
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
3737
with:
3838
toolchain: stable
3939
components: clippy
4040

41-
# - name: Create test DBs
42-
# run: |
43-
# sudo apt-get update && sudo apt-get install sqlite3
44-
# cargo install sqlx-cli --no-default-features --features=rustls,sqlite
45-
# cd basics/todo
46-
# DATABASE_URL="sqlite://./todo.db" sqlx database create
47-
# chmod a+rwx todo.db
48-
# DATABASE_URL="sqlite://./todo.db" sqlx migrate run
49-
5041
- name: clippy
5142
timeout-minutes: 30
52-
uses: giraffate/clippy-action@v1
53-
with:
54-
reporter: "github-pr-check"
55-
github_token: ${{ secrets.GITHUB_TOKEN }}
56-
clippy_flags: --workspace --all-features --tests
43+
run: cargo clippy --workspace --all-features --tests -- -D warnings

0 commit comments

Comments
 (0)