Generate All Inventories #31
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
# This workflow will generate all inventory files on schedule | |
name: Generate All Inventories | |
on: | |
pull_request: | |
branches: [master] | |
types: [opened, reopened, ready_for_review] | |
schedule: | |
- cron: '0 6 14 * *' # Runs 14th of every month at 6:00 UTC | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Update pip & install testing pkgs | |
run: | | |
python -VV | |
python -m pip install --upgrade pip setuptools wheel | |
pip install pytest pytest-cov | |
- name: Install package and dependencies | |
run: | | |
pip install . | |
- name: Generate inventory files | |
run: | | |
pytest -m inventory --log-level=DEBUG | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
# Artifact name | |
name: StEWI Inventory files | |
# A file, directory or wildcard patter that describes what to upload | |
path: | # uses local user data dir for ubuntu | |
~/.local/share/stewi/facility/* | |
~/.local/share/stewi/flow/* | |
~/.local/share/stewi/flowbyfacility/* | |
~/.local/share/stewi/flowbyprocess/* | |
~/.local/share/stewi/validation/* | |
~/.local/share/stewi/*.json | |
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` | |
# retention-days: 5 # cannot exceed the retention limit set by the repository, organization, or enterprise. |