Skip to content

Commit

Permalink
Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vv9k committed Sep 14, 2022
1 parent e29741e commit a124471
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 154 deletions.
16 changes: 0 additions & 16 deletions .github/actions/check/action.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/actions/clippy/action.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/actions/fmt/action.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Lint'
description: 'Reports lints to improve code quality and checks code formatting'
inputs: {}
outputs: {}
runs:
using: 'composite'
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
with:
components: clippy,rustfmt
- uses: actions/checkout@v2
- name: Lint
run: make lint
shell: bash
11 changes: 3 additions & 8 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ runs:
using: 'composite'
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
- name: Install dependencies
run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev || true
shell: bash
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
run: make test
36 changes: 5 additions & 31 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
name: epick PR CI

jobs:
check:
name: Check
lint:
name: Lint
strategy:
matrix:
os:
Expand All @@ -21,37 +21,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/check

fmt:
name: Rustfmt
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/fmt

clippy:
name: Clippy
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/clippy
- uses: ./.github/actions/lint

test:
name: Test Suite
needs: [check, fmt, clippy]
needs: [lint]
strategy:
matrix:
os:
Expand Down Expand Up @@ -81,4 +55,4 @@ jobs:
- name: Add wasm target
run: rustup target add wasm32-unknown-unknown
- name: Test web build
run: ./scripts/build_web.sh
run: ./scripts/build_web.sh
34 changes: 4 additions & 30 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
name: epick CI

jobs:
check:
name: Check
lint:
name: Lint
strategy:
matrix:
os:
Expand All @@ -20,37 +20,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/check

fmt:
name: Rustfmt
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/fmt

clippy:
name: Clippy
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/clippy
- uses: ./.github/actions/lint

test:
name: Test Suite
needs: [check, fmt, clippy]
needs: [lint]
strategy:
matrix:
os:
Expand Down
34 changes: 4 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
tags:
- "**"
jobs:
check:
name: Check
lint:
name: Lint
strategy:
matrix:
os:
Expand All @@ -18,37 +18,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/check

fmt:
name: Rustfmt
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/fmt

clippy:
name: Clippy
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/clippy
- uses: ./.github/actions/lint

test:
name: Test Suite
needs: [check, fmt, clippy]
needs: [lint]
strategy:
matrix:
os:
Expand Down

0 comments on commit a124471

Please sign in to comment.