Generate FBA #10
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 a single FBA | |
name: Generate FBA | |
on: | |
workflow_dispatch: # manual trigger only | |
inputs: | |
source: | |
description: "FBA" | |
required: true | |
default: "EPA_NEI_Nonroad" | |
year: | |
description: "year" | |
required: true | |
default: 2017 | |
jobs: | |
build: | |
runs-on: macos-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 | |
run: | | |
python -VV | |
python -m pip install --upgrade pip setuptools wheel | |
pip install pytest | |
# install package & dependencies | |
- name: Install package and dependencies | |
env: | |
# Temporary fix to avoid git lfs error in fedelemflowlist install https://github.com/git-lfs/git-lfs/issues/5749 | |
GIT_CLONE_PROTECTION_ACTIVE: false | |
run: | | |
pip install . | |
- name: Generate FBA | |
env: | |
SOURCE: ${{ github.event.inputs.source }} | |
YEAR: ${{ github.event.inputs.year }} | |
run: | | |
echo "Source: ${{ github.event.inputs.source }}" | |
echo "Year: ${{ github.event.inputs.year }}" | |
python tests/test_single_FBA.py --source $SOURCE --year $YEAR | |
- name: Upload files | |
if: always() | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: "${{ github.event.inputs.source }} ${{ github.event.inputs.year }}" | |
# A file, directory or wildcard patter that describes what to upload | |
path: | # uses local user data dir for macos | |
~/Library/Application Support/flowsa/FlowByActivity/* | |
~/Library/Application Support/flowsa/Log/* | |
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. |