mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Replace GitHub actions using deprecated features (#114)
This commit is contained in:
parent
0f870367b3
commit
b0256d7120
2 changed files with 14 additions and 35 deletions
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
|
@ -9,25 +9,6 @@ on:
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clippy_check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: clippy
|
|
||||||
override: true
|
|
||||||
- name: Check Clippy
|
|
||||||
uses: actions-rs/clippy-check@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
toolchain: stable
|
|
||||||
args:
|
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -38,12 +19,12 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install Rust
|
- name: Install Rust (1.66 w/ clippy)
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@1.66
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
components: clippy
|
||||||
override: true
|
- name: Install Rust (nightly w/ rustfmt)
|
||||||
components: rustfmt, clippy
|
run: rustup toolchain install nightly --component rustfmt
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -55,19 +36,17 @@ jobs:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo +nightly fmt --all -- --check
|
||||||
|
- name: Check Clippy
|
||||||
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
|
uses: giraffate/clippy-action@v1
|
||||||
with:
|
with:
|
||||||
command: fmt
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
args: --all -- --check
|
reporter: 'github-check'
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo build --release
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: '--release'
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -489,7 +489,7 @@ impl ChatState {
|
||||||
.map_err(IambError::from)?;
|
.map_err(IambError::from)?;
|
||||||
let mime = mime::IMAGE_PNG;
|
let mime = mime::IMAGE_PNG;
|
||||||
|
|
||||||
let name = Cow::from(format!("Clipboard.png"));
|
let name = "Clipboard.png";
|
||||||
let config = AttachmentConfig::new();
|
let config = AttachmentConfig::new();
|
||||||
|
|
||||||
let resp = room
|
let resp = room
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue