Skip to content

Commit

Permalink
chore(ci): differences from blockifier repo (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: Dori Medini <[email protected]>
  • Loading branch information
dorimedini-starkware authored Feb 29, 2024
1 parent 2528d3b commit c8deb3c
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 44 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
- main
- main-v[0-9].**
- main-v[0-9]+.**
tags:
- v[0-9].**
- v[0-9]+.**

pull_request:
types:
Expand All @@ -16,6 +16,9 @@ on:
- auto_merge_enabled
- edited

merge_group:
types: [checks_requested]

jobs:
commitlint:
runs-on: ubuntu-latest
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/compiled_cairo.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,5 @@ jobs:
components: rustfmt
toolchain: nightly-2024-01-12
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- run:
pip install -r crates/blockifier/tests/requirements.txt;
cargo test -- --include-ignored
32 changes: 32 additions & 0 deletions Cargo.lock

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

26 changes: 26 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[workspace]
# Using version 2 to avoid unifying features. For more info, read:
# https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2
resolver = "2"

members = ["crates/committer"]

[workspace.package]
version = "0.1.0-rc.0"
edition = "2021"
repository = "https://github.com/starkware-libs/committer/"
license = "Apache-2.0"
license-file = "LICENSE"

[workspace.dependencies]
pretty_assertions = "1.2.1"

[workspace.lints.rust]
warnings = "deny"
future-incompatible = "deny"
nonstandard-style = "deny"
rust-2018-idioms = "deny"
unused = "deny"

[workspace.lints.clippy]
as_conversions = "deny"
53 changes: 53 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const Configuration = {
/*
* Resolve and load @commitlint/config-conventional from node_modules.
* Referenced packages must be installed.
* See [the README](https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/README.md)
* for applied rules.
*/
extends: ['@commitlint/config-conventional'],
/*
* Resolve and load conventional-changelog-atom from node_modules.
* Referenced packages must be installed
*/
// parserPreset: 'conventional-changelog-atom',
/*
* Resolve and load @commitlint/format from node_modules.
* Referenced package must be installed
*/
formatter: '@commitlint/format',
/*
* Any rules defined here will override rules from @commitlint/config-conventional
*/
rules: {
'scope-enum': [2, 'always', [
'ci',
]],
},
/*
* Functions that return true if commitlint should ignore the given message.
*/
ignores: [(commit) => commit === ''],
/*
* Whether commitlint uses the default ignore rules.
*/
defaultIgnores: true,
/*
* Custom URL to show upon failure
*/
helpUrl:
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
/*
* Custom prompt configs, not used currently.
*/
prompt: {
messages: {},
questions: {
type: {
description: 'please input type:',
},
},
},
};

module.exports = Configuration;
13 changes: 13 additions & 0 deletions crates/committer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "committer"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true
description = "Computes and manages Starknet state."

[lints]
workspace = true

[dev-dependencies]
pretty_assertions.workspace = true
15 changes: 15 additions & 0 deletions crates/committer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// TODO(Dori, 3/3/2024): Delete this dummy code.
pub fn dummy() -> u8 {
7
}

#[cfg(test)]
pub mod test {
use super::dummy;
use pretty_assertions::assert_eq;

#[test]
fn test_dummy() {
assert_eq!(dummy(), 7);
}
}
4 changes: 1 addition & 3 deletions scripts/merge_paths.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"main-v0.13.1": "main"
}
{}
4 changes: 4 additions & 0 deletions scripts/merge_paths_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
def test_linear_path():
merge_paths = load_merge_paths()

# No feature branches means nothing to test.
if len(merge_paths) == 0:
return

src_dst_iter = iter(merge_paths.items())
(oldest_branch, prev_dst_branch) = next(src_dst_iter)
assert (
Expand Down

0 comments on commit c8deb3c

Please sign in to comment.