Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix ci by updating lockfile & deduping action runs #25

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
41 changes: 20 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
name: CI
on: [push, pull_request]

on:
push:
branches: ["master"]
pull_request:

jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- run: cargo clippy -- -D warnings
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Rust env
uses: ./.github/actions/setup-rust-env

- name: Rust clippy
run: cargo clippy -- -D warnings

rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Install stable toolchain with rustfmt available
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Setup Rust env
uses: ./.github/actions/setup-rust-env

- run: cargo fmt --check
- name: Rust fmt
run: cargo fmt --check

test:
name: Test
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ jobs:
with:
fetch-depth: 2

- name: Download binaries
uses: actions/download-artifact@v3
with:
name: built-binaries
path: bin

- name: Check if release should be created
shell: bash
run: |
Expand All @@ -111,6 +105,13 @@ jobs:
echo "SHOULD_RELEASE=yes" >> $GITHUB_ENV
fi

- name: Download binaries
uses: actions/download-artifact@v3
if: env.SHOULD_RELEASE == 'yes'
with:
name: built-binaries
path: bin

- name: Publish release
uses: softprops/action-gh-release@v1
if: env.SHOULD_RELEASE == 'yes'
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.