Skip to content

Commit

Permalink
release: phase 2 (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmg-duarte authored Nov 18, 2024
2 parents 5e1b643 + f91ecb7 commit 644f41e
Show file tree
Hide file tree
Showing 320 changed files with 64,182 additions and 25 deletions.
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Ignore everything
*

# Allow files and directories
!/api
!/cli
!/Justfile
!/lib
!/maat
!/node
!/pallets
!/primitives
!/runtime
!/storage
!/rust-toolchain.toml
!/Cargo.lock
!/Cargo.toml
8 changes: 8 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi

watch_file rust-toolchain.toml
use flake
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Any change in the repo requests review from the dev team

- @cernicc @th7nder @jmg-duarte @aidan46
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Description

Write an explicit description about what the PR changes, and how you implemented
the change.

The quality of the description directly impacts the quality of the review
process for everyone. Adding relevant context (i.e. describing the reasons for
the change, adding links to relevant documents, etc) to your description ensures
that everyone is able to easily gather the context necessary to review your
change.

### Important points for reviewers

Add some additional resources that could help the reviewer with the
review. Like link to specs if implementing a protocol.

### Checklist

- [ ] Are there important points that reviewers should know?
- [ ] If yes, which ones?
- [ ] Make sure that you described what this change does.
- [ ] If there are follow-ups, have you created issues for them?
- [ ] If yes, which ones? / List them here
- [ ] Have you tested this solution?
- [ ] Were there any alternative implementations considered?
- [ ] Did you document new (or modified) APIs?
93 changes: 93 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI

on:
pull_request:
types: [labeled]
push:
branches: [develop, main]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
check-files:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check-files.outputs.skip }}
steps:
- uses: actions/checkout@v4
- uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c #v44.5.7
id: changed-files
with:
files: |
**/*.rs
**/Cargo.toml
**/*.scale
- name: Check if proper files changed
id: check-files
run: |
if [[ "${{ steps.changed-files.outputs.any_changed }}" == "false" ]]; then
echo "No files changed. Skipping CI."
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "Some files changed. Running CI."
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: '0.4.40'
- name: Build the book
run: mdbook build docs

toml:
if: ${{ needs.check-files.outputs.skip == 'false' && ((github.event.label.name == 'ready for review') || (github.ref_name == 'develop') || (github.ref_name == 'master')) }}
runs-on: self-hosted
needs: check-files
steps:
- uses: actions/checkout@v4
- name: List versions
run: |
cargo --version
taplo --version
- name: Run taplo
run: |
taplo lint
taplo fmt --check
format:
runs-on: self-hosted
needs: toml
steps:
- uses: actions/checkout@v4
- name: List version
run: |
cargo +nightly --version
cargo +nightly fmt --version
- name: Cargo format
run: cargo +nightly fmt --all -- --check

clippy_build_and_test:
runs-on: self-hosted
needs:
- format
steps:
- uses: actions/checkout@v4
- name: List version
run: |
rustup show
cargo --version
cargo clippy --version
cargo tarpaulin --version
- name: Build in dev mode
run: RUSTFLAGS="-D warnings" cargo build --profile ci --locked
- name: Cargo clippy
run: RUSTFLAGS="-D warnings" cargo clippy --profile ci --locked
- name: Run tests
run: RUSTFLAGS="-D warnings" cargo tarpaulin --profile ci --locked --workspace --exclude maat
Loading

0 comments on commit 644f41e

Please sign in to comment.