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

Add Prettier to the CI workflows #505

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/audit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Security audit
on:
pull_request:
branches:
- '**'
- "**"

jobs:
security_audit:
Expand Down
157 changes: 78 additions & 79 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

name: Tests

on:
push:
branches:
- main
tags:
- '**'
- "**"
pull_request:
branches:
- '**'
- "**"

jobs:
tests:
Expand All @@ -19,104 +18,104 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: chia-network/actions/setup-python@main
name: Install Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- uses: chia-network/actions/setup-python@main
name: Install Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}

- name: Update pip
run: |
- name: Update pip
run: |
python -m pip install --upgrade pip

- name: Set up rust
uses: dtolnay/rust-toolchain@stable
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: setup venv
run: |
python -m venv venv
- name: setup venv
run: |
python -m venv venv

- uses: chia-network/actions/activate-venv@main
- uses: chia-network/actions/activate-venv@main

- name: Install dependencies
run: |
python -m pip install maturin
rustup target add x86_64-unknown-linux-musl
python -m pip install pytest
python -m pip install mypy
python -m pip install black
- name: Install dependencies
run: |
python -m pip install maturin
rustup target add x86_64-unknown-linux-musl
python -m pip install pytest
python -m pip install mypy
python -m pip install black

- name: Build
run: |
python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8
maturin develop --release -m wheel/Cargo.toml
- name: Build
run: |
python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8
maturin develop --release -m wheel/Cargo.toml

- name: python mypy
run: |
mypy --ignore-missing-imports tests
- name: python mypy
run: |
mypy --ignore-missing-imports tests

- name: python black
run: |
black --check tests
black --check wheel/generate_type_stubs.py
- name: python black
run: |
black --check tests
black --check wheel/generate_type_stubs.py

- name: python tests
run: |
pytest tests
- name: python tests
run: |
pytest tests

generator-benchmarks:
name: Generator performance
runs-on: benchmark
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: chia-network/actions/setup-python@main
name: Install Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- uses: chia-network/actions/setup-python@main
name: Install Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}

- name: Set up rust
uses: dtolnay/rust-toolchain@stable
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: setup venv
run: |
python -m venv venv
- name: setup venv
run: |
python -m venv venv

- uses: chia-network/actions/activate-venv@main
- uses: chia-network/actions/activate-venv@main

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install maturin colorama clvm_tools
rustup target add x86_64-unknown-linux-musl
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install maturin colorama clvm_tools
rustup target add x86_64-unknown-linux-musl

- name: Build
run: |
maturin develop --release -m wheel/Cargo.toml
- name: Build
run: |
maturin develop --release -m wheel/Cargo.toml

- name: test generators
run: |
cd tests
./test-generators.py
- name: test generators
run: |
cd tests
./test-generators.py

- name: Run cost checks
run: |
cd tests
./generate-programs.py
./run-programs.py
- name: Run cost checks
run: |
cd tests
./generate-programs.py
./run-programs.py

benchmarks:
name: rust benchmarks
Expand All @@ -125,13 +124,13 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up rust
uses: dtolnay/rust-toolchain@stable
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: cargo bench
run: |
cargo bench --workspace --exclude chia_rs
- name: cargo bench
run: |
cargo bench --workspace --exclude chia_rs
Loading
Loading