Skip to content

Commit

Permalink
chore: merge branch 'release/v2_contracts' into feat/incentive-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
kerber0x committed Apr 11, 2024
2 parents 98af037 + 426c5c2 commit 1a506aa
Show file tree
Hide file tree
Showing 94 changed files with 1,399 additions and 4,202 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# define x-task aliases
# see https://github.com/matklad/cargo-xtask
[alias]
xtask = "run --package xtask --"
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
- [ ] I updated/added relevant documentation.
- [ ] The code is formatted properly `cargo fmt --all --`.
- [ ] Clippy doesn't report any issues `cargo clippy -- -D warnings`.
- [ ] I have regenerated the schemas if needed `cargo schema`.
- [ ] I have regenerated the schemas if needed with `just schemas`.
9 changes: 1 addition & 8 deletions .github/workflows/ci-test-fmt-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
test_and_check-token_factory_feature:
name: Test and check Token factory feature
runs-on: ubuntu-latest

steps:
# Cancel any existing runs to save on CI time
# - name: Cancel Previous Runs
Expand Down Expand Up @@ -70,15 +69,9 @@ jobs:
command: fmt
args: --all -- --check

- name: Generate Schemas and Exit on uncommitted changes
run: |
chmod +x ./scripts/build_schemas.sh
./scripts/build_schemas.sh -f token_factory -d true
shell: bash

test_and_check-token_injective_feature:
name: Test and check Injective feature
runs-on: ubuntu-latestq
runs-on: ubuntu-latest

steps:
# Cancel any existing runs to save on CI time
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/validate-schemas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Validate schemas

on:
pull_request:
push:
branches:
- main

jobs:
validate_schemas:
name: Validate schemas are up to date
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable

- name: Validate schemas are up to date
run: ./scripts/build_schemas.sh -d true

- name: Add comment if failed
if: ${{ failure() }}
uses: actions/github-script@v7
with:
script: |
const { execSync } = require("child_process");
const diffSchemas = execSync(
'git ls-files --modified --others --exclude-standard "*.json"',
{ encoding: "utf-8" }
).trim();
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Schema generation had missing jobs:\n\`\`\`\n${diffSchemas}\n\`\`\`\nPlease run \`just schemas\` locally and upload the generated schemas.`
})
Loading

0 comments on commit 1a506aa

Please sign in to comment.