Skip to content

Tt/update iced

Tt/update iced #224

Workflow file for this run

name: Continuous integration for workout generator.
on:
push:
branches:
- master
pull_request:
# For clippy check to post in PR
permissions:
pull-requests: write
checks: write
contents: read
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run-tests:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
test: [
{test-name: Unit tests, command-to-execute: cargo test --lib --bins},
{test-name: Doctests, command-to-execute: cargo test --doc},
{test-name: Integration tests, command-to-execute: cargo test --test '*'},
]
runs-on: ${{ matrix.operating-system }}
name: ${{ matrix.test.test-name }} on ${{ matrix.operating-system }}
steps:
- name: Checkout Repository.
uses: actions/checkout@v2
- name: Setup ubuntu
if: ${{ contains(matrix.operating-system, 'ubuntu') }}
run: sudo apt-get install build-essential libgtk-3-dev
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run tests
run: ${{ matrix.test.command-to-execute }}
clippy-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v1
- name: Setup ubuntu
run: sudo apt-get install build-essential libgtk-3-dev
- name: Install latest rust toolchain.
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Make sure all clippy issues lead to error.
run: cargo clippy -- -D warnings
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v1
- name: Setup ubuntu
run: sudo apt-get install build-essential libgtk-3-dev
- name: Install latest rust toolchain.
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Check codebase for formatting errors.
run: cargo fmt --all -- --check
clippy-check-pr:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository.
uses: actions/checkout@v1
- name: Setup ubuntu
run: sudo apt-get install build-essential libgtk-3-dev
- name: Install latest rust toolchain.
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Get clippy warnings and post to PR.
uses: actions-rs/clippy-check@v1
id: clippy
with:
token: ${{ secrets.GITHUB_TOKEN }}
validate-semantic-commits:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository.
uses: actions/checkout@v1
- name: Setup gitlint and executed check.
run: |
pip install gitlint-core==0.19.1
gitlint --config .gitlint-configuration --commits "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"