Skip to content

iterate

iterate #522

Workflow file for this run

name: Install and Test
on: [push]
jobs:
build-linux:
defaults:
run:
# Ensures environment gets sourced right
shell: bash -l {0}
name: Python (${{ matrix.PYTHON_VERSION }})
runs-on: ubuntu-latest
strategy:
matrix:
PYTHON_VERSION: ["3.9", "3.10", "3.11"]
env:
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Add /etc/hosts entries
run: |
cat .github/workflows/etchosts.txt | sudo tee -a /etc/hosts
# setup conda-forge with micromamba
- name: Setup Python
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
condarc: |
channels:
- conda-forge
- defaults
create-args: >-
python=${{ env.PYTHON_VERSION }}
environment-name: prod
cache-environment: true
- name: Setup Postgres
run: |
git clone --depth 1 https://github.com/akrherz/iem-database.git database
git clone --depth 1 https://github.com/akrherz/ci_tooling.git .ci_tooling
. .ci_tooling/postgres.sh
cd database; sh bootstrap.sh
python schema_manager.py
- name: Setup Memcached
run: |
. .ci_tooling/memcached.sh
- name: Install and Test
run: |
set -e
# pip install from requirements.txt
python -m pip install -r pip_requirements.txt
python -m pip install codecov
python -m pip install . --upgrade
cp settings.json-template settings.json
# This is a bit brittle, but loads some data
python util/ugcs_update.py fz08mr23 2023 3 08
python util/merge_hvtec_nwsli.py hvtec_list.20230627.csv
python util/copy_iem_network.py MN_ASOS
python util/copy_iem_network.py NY_COOP
python util/copy_iem_network.py NWSCLI
python util/copy_iem_network.py NEXRAD
python util/copy_iem_network.py TWDR
sh util/run_examples.sh
# get pqinsert available as a dummy command
export PATH=$PATH:$(pwd)/tests/bin
coverage run --source=pywwa setup.py test
coverage xml
- name: Upload coverage to Codecov
if: ${{ env.PYTHON_VERSION == '3.11' }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: coverage.xml
fail_ci_if_error: true