Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Deal with another batch of GHA warning messages #14313

Merged
merged 5 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 41 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: matrix-org/setup-python-poetry@v1
with:
extras: "all"
Expand All @@ -44,6 +46,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
- run: scripts-dev/check_schema_delta.py --force-colors

Expand All @@ -68,6 +72,8 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: "pip install 'towncrier>=18.6.0rc1'"
- run: scripts-dev/check-newsfragment.sh
env:
Expand All @@ -87,16 +93,18 @@ jobs:
lint-clippy:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
# if: ${{ needs.changes.outputs.rust == 'true' }}

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
components: clippy
- uses: Swatinem/rust-cache@v2

Expand All @@ -105,17 +113,19 @@ jobs:
lint-rustfmt:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
# if: ${{ needs.changes.outputs.rust == 'true' }}

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
components: rustfmt
toolchain: 1.58.1
components: rustfmt
- uses: Swatinem/rust-cache@v2

- run: cargo fmt --check
Expand Down Expand Up @@ -143,6 +153,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- id: get-matrix
run: .ci/scripts/calculate_jobs.py
outputs:
Expand All @@ -169,10 +181,12 @@ jobs:
postgres:${{ matrix.job.postgres-version }}

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
- uses: Swatinem/rust-cache@v2

- uses: matrix-org/setup-python-poetry@v1
Expand Down Expand Up @@ -211,10 +225,12 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
- uses: Swatinem/rust-cache@v2

# There aren't wheels for some of the older deps, so we need to install
Expand Down Expand Up @@ -327,10 +343,12 @@ jobs:
run: cat sytest-blacklist .ci/worker-blacklist > synapse-blacklist-with-workers

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
- uses: Swatinem/rust-cache@v2

- name: Run SyTest
Expand Down Expand Up @@ -459,10 +477,12 @@ jobs:
path: synapse

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
- uses: Swatinem/rust-cache@v2

- name: Prepare Complement's Prerequisites
Expand All @@ -475,7 +495,7 @@ jobs:
name: Run Complement Tests

cargo-test:
if: ${{ needs.changes.outputs.rust == 'true' }}
# if: ${{ needs.changes.outputs.rust == 'true' }}
runs-on: ubuntu-latest
needs:
- linting-done
Expand All @@ -485,10 +505,12 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
# There don't seem to be versioned releases of this action per se: for each rust
# version there is a branch which gets constantly rebased on top of master.
# We pin to a specific commit for paranoia's sake.
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
with:
toolchain: 1.58.1
override: true
- uses: Swatinem/rust-cache@v2

- run: cargo test
Expand Down
1 change: 1 addition & 0 deletions changelog.d/14313.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch to a maintained action for installing Rust in CI.