Continuous Integration #24
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
name: Continuous Integration | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'docker/**' | |
- 'graphenex/**' | |
push: | |
branches: | |
- main | |
paths: | |
- 'docker/**' | |
- 'graphenex/**' | |
jobs: | |
linter: | |
name: "Linter check" | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: 'flake8 python linter' | |
uses: py-actions/flake8@v2 | |
setup_linux: | |
name: "Linux setup" | |
runs-on: ubuntu-latest | |
# needs: linter | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: 'install dependencies' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
--no-install-recommends \ | |
--allow-unauthenticated python3-pip | |
- name: 'install graphenex' | |
run: | | |
git clone https://github.com/grapheneX/grapheneX.git | |
python3 -m pip install poetry | |
poetry install | |
- name: 'test' | |
run: ls -a | |
- name: 'test' | |
run: | | |
cd ~ | |
ls -a | |
- name: 'test' | |
run: | | |
cd ~/.local | |
ls -a | |
- name: "python import issue workaround" | |
run: sed -i '/Mapping/s/collections/collections.abc/' ~/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py | |
- name: 'run graphenex' | |
run: poetry run grapheneX | |
setup_windows: | |
name: "Windows setup" | |
runs-on: windows-latest | |
needs: linter | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: 'install python' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.0' | |
cache: 'pip' | |
- name: 'update pip' | |
run: python -m pip install --upgrade pip | |
- name: 'install graphenex' | |
run: python3 -m pip install graphenex | |
- name: 'python import issue workaround' | |
shell: pwsh | |
run: (Get-Content C:\hostedtoolcache\windows\python\3.10.0\x64\lib\site-packages\prompt_toolkit\styles\from_dict.py) -Replace 'from collections import Mapping', 'from collections.abc import Mapping' | Set-Content C:\hostedtoolcache\windows\python\3.10.0\x64\lib\site-packages\prompt_toolkit\styles\from_dict.py | |
- name: "pip update flask_socketio" | |
run: python3 -m pip install --upgrade flask_socketio | |
- name: 'run graphenex' | |
run: graphenex | |