Fix data_timezone when saving addupi telemetry #136
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '10' | |
- name: Set up Chrome | |
uses: browser-actions/setup-chrome@latest | |
- name: Install Dependencies | |
run: | | |
echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list | |
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install -y gdal-bin libgdal-dev postgresql-14-postgis-3 timescaledb-2-postgresql-14 | |
sudo bash -c "echo \"shared_preload_libraries = 'timescaledb'\" >>/etc/postgresql/14/main/postgresql.conf" | |
sudo service postgresql restart | |
sudo -u postgres psql -U postgres -c "create extension postgis" | |
sudo -u postgres psql -U postgres -c "create user runner password 'topsecret' superuser" | |
sudo -u postgres psql -U postgres -c "create database openmeteo owner runner" | |
python -m pip install --upgrade pip 'setuptools<58' # See https://stackoverflow.com/questions/69123406 | |
CPLUS_INCLUDE_PATH=/usr/include/gdal C_INCLUDE_PATH=/usr/include/gdal pip install 'gdal==3.4.1' | |
pip install 'psycopg2>=2.8,<2.9' codecov coverage isort flake8 'black>=22.8,<23' | |
wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/`google-chrome --version|awk '{ print $3 }'`/linux64/chromedriver-linux64.zip | |
sudo unzip chromedriver-linux64.zip -d /usr/local/bin | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
npm install | |
cp enhydris_project/settings/ci.py enhydris_project/settings/local.py | |
- name: Run Tests | |
run: | | |
python manage.py makemigrations --check | |
black --check . | |
flake8 --max-line-length=88 . | |
isort --check-only --diff . | |
npm run lint | |
coverage run --include="./*" --omit="*/tests/*","*/tests.py","*/migrations/*","./enhydris_project/*" manage.py test -v2 | |
npm run test | |
codecov |