Skip to content

Commit

Permalink
feat: Init test suite (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Bela Stoyan <[email protected]>
Co-authored-by: Pavel Zwerschke <[email protected]>
  • Loading branch information
3 people authored Jun 4, 2024
1 parent dc301c4 commit c09fcc0
Show file tree
Hide file tree
Showing 18 changed files with 3,762 additions and 140 deletions.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Motivation

<!-- Why is this change necessary? Link issues here if applicable. -->

# Changes

<!-- What changes have been performed? -->
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
reviewers:
- quantco/ci
groups:
gh-actions:
patterns:
- "*"
commit-message:
prefix: ci
- package-ecosystem: cargo
directory: /
schedule:
interval: monthly
groups:
rust-dependencies:
patterns:
- "*"
commit-message:
prefix: build
labels:
- dependencies
90 changes: 90 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# ------------------------------------- PULL REQUEST LABELS ------------------------------------- #
autolabeler:
# Conventional Commit Types (https://github.com/commitizen/conventional-commit-types)
- label: build
title:
- '/^build(\(.*\))?(\!)?\:/'
- label: chore
title:
- '/^chore(\(.*\))?(\!)?\:/'
- label: ci
title:
- '/^ci(\(.*\))?(\!)?\:/'
- label: documentation
title:
- '/^docs(\(.*\))?(\!)?\:/'
- label: enhancement
title:
- '/^feat(\(.*\))?(\!)?\:/'
- label: fix
title:
- '/^fix(\(.*\))?(\!)?\:/'
- label: performance
title:
- '/^perf(\(.*\))?(\!)?\:/'
- label: refactor
title:
- '/^refactor(\(.*\))?(\!)?\:/'
- label: revert
title:
- '/^revert(\(.*\))?(\!)?\:/'
- label: style
title:
- '/^style(\(.*\))?(\!)?\:/'
- label: test
title:
- '/^test(\(.*\))?(\!)?\:/'
# Custom Types
- label: breaking
title:
- '/^[a-z]+(\(.*\))?\!\:/'
# ------------------------------------ RELEASE CONFIGURATION ------------------------------------ #
category-template: "### $TITLE"
change-template: "- $TITLE by @$AUTHOR in [#$NUMBER]($URL)"
replacers:
# remove conventional commit tag & scope from change list
- search: '/- [a-z]+(\(.*\))?(\!)?\: /g'
replace: "- "
template: |
## What's Changed
$CHANGES
**Full Changelog:** [`$PREVIOUS_TAG...v$RESOLVED_VERSION`](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)
categories:
- title: ⚠️ Breaking Changes
labels:
- breaking
- title: ✨ New Features
labels:
- enhancement
- title: 🐞 Bug Fixes
labels:
- fix
- title: 🏎️ Performance Improvements
labels:
- performance
- title: 📚 Documentation
labels:
- documentation
- title: 🏗️ Testing
labels:
- test
- title: ⚙️ Automation
labels:
- ci
- title: 🛠 Builds
labels:
- build
- title: 💎 Code Style
labels:
- style
- title: 📦 Refactorings
labels:
- refactor
- title: ♻️ Chores
labels:
- chore
- title: 🗑 Reverts
labels:
- revert
31 changes: 8 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,19 @@ jobs:
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
with:
environments: default lint
- name: Set up cargo cache # use https://github.com/Swatinem/rust-cache once whitelisted
uses: actions/cache@v3
continue-on-error: false
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
key: pre-commit
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure

unit-tests:
name: test
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout branch
uses: actions/checkout@v4
Expand All @@ -45,17 +39,8 @@ jobs:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
- name: Set up cargo cache # use https://github.com/Swatinem/rust-cache once whitelisted
uses: actions/cache@v3
continue-on-error: false
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
key: tests
- name: Run test
run: pixi run test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ $RECYCLE.BIN/
# pixi environments
.pixi
*.egg-info

# pixi-pack
environment.tar.zstd
environment.tar
environment
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: ^env/
repos:
- repo: local
hooks:
Expand Down
Loading

0 comments on commit c09fcc0

Please sign in to comment.