-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
321d7b4
commit 830cfed
Showing
3 changed files
with
165 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
name: Node | ||
# name: Node | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- babushka-core/** | ||
- submodules/** | ||
- node/** | ||
pull_request: | ||
paths: | ||
- babushka-core/src/** | ||
- submodules/** | ||
- node/** | ||
# on: | ||
# push: | ||
# branches: ["main"] | ||
# paths: | ||
# - babushka-core/** | ||
# - submodules/** | ||
# - node/** | ||
# pull_request: | ||
# paths: | ||
# - babushka-core/src/** | ||
# - submodules/** | ||
# - node/** | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
# env: | ||
# CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
redis: | ||
- 7.0.7 | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 10 | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# redis: | ||
# - 7.0.7 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
|
||
- name: Install redis | ||
uses: ./.github/workflows/install-redis | ||
with: | ||
redis-version: ${{ matrix.redis }} | ||
# - name: Install redis | ||
# uses: ./.github/workflows/install-redis | ||
# with: | ||
# redis-version: ${{ matrix.redis }} | ||
|
||
- name: Install protoc | ||
run: | | ||
sudo apt update | ||
sudo apt install protobuf-compiler | ||
# - name: Install protoc | ||
# run: | | ||
# sudo apt update | ||
# sudo apt install protobuf-compiler | ||
|
||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
# - name: Use Node.js 16.x | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 16.x | ||
|
||
- name: npm install and test | ||
run: | | ||
rm -rf node_modules && npm install --frozen-lockfile | ||
npm install | ||
working-directory: ./node/rust-client | ||
# - name: npm install and test | ||
# run: | | ||
# rm -rf node_modules && npm install --frozen-lockfile | ||
# npm install | ||
# working-directory: ./node/rust-client | ||
|
||
- name: build | ||
run: | | ||
rm -rf node_modules && npm install --frozen-lockfile | ||
npm run build | ||
working-directory: ./node | ||
# - name: build | ||
# run: | | ||
# rm -rf node_modules && npm install --frozen-lockfile | ||
# npm run build | ||
# working-directory: ./node | ||
|
||
- name: test | ||
run: npm test | ||
working-directory: ./node | ||
# - name: test | ||
# run: npm test | ||
# working-directory: ./node | ||
|
||
lint-rust: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
# lint-rust: | ||
# timeout-minutes: 10 | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
|
||
- uses: ./.github/workflows/lint-rust | ||
with: | ||
cargo-toml-folder: ./node/rust-client | ||
# - uses: ./.github/workflows/lint-rust | ||
# with: | ||
# cargo-toml-folder: ./node/rust-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,101 @@ | ||
name: Python tests | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- python/** | ||
- babushka-core/src/** | ||
- submodules/** | ||
pull_request: | ||
paths: | ||
- python/** | ||
- babushka-core/src/** | ||
- submodules/** | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
redis: | ||
- 6.2.4 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install redis | ||
uses: ./.github/workflows/install-redis | ||
with: | ||
redis-version: ${{ matrix.redis }} | ||
|
||
- name: Install protoc | ||
run: | | ||
sudo apt update | ||
sudo apt install protobuf-compiler | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
working-directory: ./python | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 isort black | ||
- name: Lint with isort | ||
working-directory: ./python | ||
run: | | ||
isort . --profile black --check --diff | ||
- name: Lint with flake8 | ||
working-directory: ./python | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/* | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/* | ||
- name: Lint with black | ||
working-directory: ./python | ||
run: | | ||
black --target-version py36 --check --diff . | ||
- name: Start redis server | ||
working-directory: ./python | ||
run: redis-server & | ||
|
||
- name: Generate protobuf files | ||
working-directory: . | ||
run: | | ||
protoc -Iprotobuf=./babushka-core/src/protobuf/ --python_out=./python/python/pybushka ./babushka-core/src/protobuf/*.proto | ||
- name: Test with pytest | ||
working-directory: ./python | ||
run: | | ||
python -m venv .env | ||
source .env/bin/activate | ||
pip install -r requirements.txt | ||
maturin develop --release | ||
pytest --asyncio-mode=auto | ||
lint-rust: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: ./.github/workflows/lint-rust | ||
with: | ||
cargo-toml-folder: ./python | ||
# name: Python tests | ||
|
||
# on: | ||
# push: | ||
# branches: ["main"] | ||
# paths: | ||
# - python/** | ||
# - babushka-core/src/** | ||
# - submodules/** | ||
# pull_request: | ||
# paths: | ||
# - python/** | ||
# - babushka-core/src/** | ||
# - submodules/** | ||
|
||
# permissions: | ||
# contents: read | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 10 | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# redis: | ||
# - 6.2.4 | ||
|
||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
|
||
# - name: Install redis | ||
# uses: ./.github/workflows/install-redis | ||
# with: | ||
# redis-version: ${{ matrix.redis }} | ||
|
||
# - name: Install protoc | ||
# run: | | ||
# sudo apt update | ||
# sudo apt install protobuf-compiler | ||
|
||
# - name: Set up Python 3.10 | ||
# uses: actions/setup-python@v3 | ||
# with: | ||
# python-version: "3.10" | ||
|
||
# - name: Install dependencies | ||
# working-directory: ./python | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install flake8 isort black | ||
|
||
# - name: Lint with isort | ||
# working-directory: ./python | ||
# run: | | ||
# isort . --profile black --check --diff | ||
|
||
# - name: Lint with flake8 | ||
# working-directory: ./python | ||
# run: | | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/* | ||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/* | ||
|
||
# - name: Lint with black | ||
# working-directory: ./python | ||
# run: | | ||
# black --target-version py36 --check --diff . | ||
|
||
# - name: Start redis server | ||
# working-directory: ./python | ||
# run: redis-server & | ||
|
||
# - name: Generate protobuf files | ||
# working-directory: . | ||
# run: | | ||
# protoc -Iprotobuf=./babushka-core/src/protobuf/ --python_out=./python/python/pybushka ./babushka-core/src/protobuf/*.proto | ||
|
||
# - name: Test with pytest | ||
# working-directory: ./python | ||
# run: | | ||
# python -m venv .env | ||
# source .env/bin/activate | ||
# pip install -r requirements.txt | ||
# maturin develop --release | ||
# pytest --asyncio-mode=auto | ||
|
||
# lint-rust: | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 10 | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
|
||
# - uses: ./.github/workflows/lint-rust | ||
# with: | ||
# cargo-toml-folder: ./python |
Oops, something went wrong.