remove crudini requirement #1030
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: Mycodo | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Workaround for https://github.com/actions/runner-images/issues/675 | |
run: | | |
sudo gem install apt-spy2 | |
sudo apt-spy2 fix --commit --launchpad --country=US | |
- name: Install dependencies | |
run: | | |
sudo bash mycodo/scripts/upgrade_commands.sh update-apt | |
sudo apt install -y libatlas-base-dev libboost-python-dev gawk git libffi-dev libi2c-dev nginx python3-dev sqlite3 swig | |
sudo bash mycodo/scripts/upgrade_commands.sh update-packages | |
git clone --recursive https://github.com/WiringPi/WiringPi-Python.git && cd WiringPi-Python && git submodule update --init && cd WiringPi && ./build && cd ../.. | |
sudo bash mycodo/scripts/upgrade_commands.sh build-pigpiod | |
sudo bash mycodo/scripts/upgrade_commands.sh update-influxdb-1 | |
sudo service influxdb start && sleep 3 | |
sudo bash mycodo/scripts/upgrade_commands.sh update-influxdb-1-db-user | |
sudo useradd -M mycodo | |
export PATH=/usr/bin:$PATH | |
- name: Test setup components | |
run: | | |
sudo bash mycodo/scripts/upgrade_commands.sh setup-virtualenv | |
sudo bash mycodo/scripts/upgrade_commands.sh update-pip3 | |
sudo bash mycodo/scripts/upgrade_commands.sh update-pip3-packages | |
sudo bash mycodo/scripts/upgrade_commands.sh ssl-certs-generate | |
sudo bash mycodo/scripts/upgrade_commands.sh compile-translations | |
sudo bash mycodo/scripts/upgrade_commands.sh generate-widget-html | |
sudo bash mycodo/scripts/generate_translations_pybabel.sh | |
printf "\n#### Generating Docs\n" | |
env/bin/python mycodo/scripts/generate_manual_actions.py | |
env/bin/python mycodo/scripts/generate_manual_functions.py | |
env/bin/python mycodo/scripts/generate_manual_inputs_by_measure.py | |
env/bin/python mycodo/scripts/generate_manual_inputs.py | |
env/bin/python mycodo/scripts/generate_manual_outputs.py | |
env/bin/python mycodo/scripts/generate_manual_widgets.py | |
printf "\n#### Generating API Manual\n" | |
sudo env/bin/python mycodo/start_flask_ui.py & | |
sleep 10 | |
wget --no-check-certificate -p https://127.0.0.1 -O /dev/null | |
printf "\n# Installing npm\n" | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | |
NODE_MAJOR=20 | |
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list | |
sudo apt update | |
sudo apt install nodejs | |
printf "\n# Installing redoc-cli\n" | |
sudo npm install -g redoc-cli | |
printf "\n# Generating manual\n" | |
sudo bash mycodo/scripts/generate_manual_api.sh | |
- name: Test with pytest | |
run: | | |
cd mycodo && ../env/bin/pytest -W ignore::DeprecationWarning -s tests/software_tests |