Skip to content

Commit

Permalink
CI: Add a GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Dec 23, 2023
1 parent fb4c094 commit 8412b11
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Build
run: cargo build --verbose

run_unit_tests:
name: 'Run unit tests'
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Test
run: cargo test

type_check_prelude:
name: 'Type check Prelude.hs'
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: 'Type check Prelude.hs'
run: cargo run

check_formatting:
name: 'Check formatting'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true

- name: Check formatting
run: cargo fmt --all -- --check

check_lints:
name: 'Check lints'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Check lints
run: cargo clippy --all-targets --all

0 comments on commit 8412b11

Please sign in to comment.