Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Init test suite #5

Merged
merged 19 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
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? -->
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2
registries:
github:
type: git
url: https://github.com
username: x-access-token
password: ${{ secrets.DEPENDABOT_CONTENT_PAT }}
delsner marked this conversation as resolved.
Show resolved Hide resolved
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
reviewers:
- quantco/ci
registries:
- github
delsner marked this conversation as resolved.
Show resolved Hide resolved
groups:
gh-actions:
patterns:
- "*"
commit-message:
prefix: ci
- package-ecosystem: cargo
delsner marked this conversation as resolved.
Show resolved Hide resolved
directory: /
schedule:
interval: monthly
registries:
- github
delsner marked this conversation as resolved.
Show resolved Hide resolved
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO add coverage + codecov upload here

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@v2
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@v2
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
Loading