-
Notifications
You must be signed in to change notification settings - Fork 22
82 lines (69 loc) · 2.5 KB
/
test_methods.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# This workflow provides testing for FlowByActivity configurations and
# generates FlowBySector files and compares to the latest public version
name: Testing for FlowByActivity and FlowBySector Methods
on:
# push: # removed to run only on pull request
pull_request:
branches: [master, develop]
types: [opened, reopened, ready_for_review] # excludes syncronize to avoid redundant trigger from commits on PRs
workflow_dispatch: # also allow manual trigger, for testing purposes
jobs:
FBA_testing:
runs-on: macos-latest
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 flake8
# install package & dependencies
- name: Install package and dependencies
run: |
pip install .
- name: Test FBA config
run: |
python tests/test_methods.py
FBS_testing:
runs-on: macos-latest
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 flake8
# install package & dependencies
- name: Install package and dependencies
run: |
pip install .
- name: Compare FBS with remote
id: FBS
if: always() # Proceed even if Test FBA fails
run: |
for m in $(python tests/test_FBS_against_remote.py list)
do
python tests/test_FBS_against_remote.py "$m"
done
- name: Upload csv files
# if: steps.FBS.outcome == 'success' # Upload csv only if step succeeds
if: always()
uses: actions/upload-artifact@v3.1.1
with:
# Artifact name
name: FBS diff files
# A file, directory or wildcard patter that describes what to upload
path: |
~/Library/Application Support/flowsa/FBSComparisons/*
~/Library/Application Support/flowsa/FlowBySector/*
~/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.