Skip to content
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
42 changes: 42 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2025 FastLabs Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The pull request's title should be fulfilled the following pattern:
#
# <type>[optional scope]: <description>
#
# ... where valid types and scopes can be found below; for example:
#
# build(maven): One level down for native profile
#
# More about configurations on https://github.com/Ezard/semantic-prs#configuration

enabled: true

titleOnly: true

types:
- feat
- fix
- docs
- style
- refactor
- perf
- test
- build
- ci
- chore
- revert

targetUrl: https://github.com/fast/exn/blob/main/.github/semantic.yml
52 changes: 41 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 FastLabs Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: CI

on:
Expand All @@ -6,6 +20,19 @@ on:
pull_request:
branches: [ main ]

# Concurrency strategy:
# github.workflow: distinguish this workflow from others
# github.event_name: distinguish `push` event from `pull_request` event
# github.event.number: set to the number of the pull request if `pull_request` event
# github.run_id: otherwise, it's a `push` event, only cancel if we rerun the workflow
#
# Reference:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

Expand All @@ -15,45 +42,48 @@ jobs:
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
- uses: actions/checkout@v5
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt, clippy
components: rustfmt,clippy
- uses: taiki-e/install-action@v2
with:
tool: typos-cli,taplo-cli,hawkeye
- name: Cargo version
run: cargo --version
- name: Check format
run: cargo fmt --all -- --check
- name: Check clippy
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: Check typos
run: typos
- name: Check taplo
run: taplo check
- name: Run hawkeye
run: hawkeye check

test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
rust: [ "1.80.0", "stable", "nightly" ]
rust: [ "1.85.0", "stable", "nightly" ]
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Cargo version
run: cargo --version

- name: Build
run: cargo build --workspace --all-targets

- name: Build Release
run: cargo build --workspace --all-targets --release

- name: Run tests
run: |
cargo test
run: cargo test -- --nocapture
130 changes: 58 additions & 72 deletions Cargo.lock

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

Loading
Loading