File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Bot validation
2+
3+ on :
4+ push :
5+ paths :
6+ - ' caltechdata_api/cli.py'
7+ - ' caltechdata_api/customize_schema.py'
8+ - ' caltechdata_api/caltechdata_write.py'
9+ - ' caltechdata_api/caltechdata_edit.py'
10+ - ' README.md'
11+ pull_request :
12+ paths :
13+ - ' caltechdata_api/cli.py'
14+ - ' caltechdata_api/customize_schema.py'
15+ - ' caltechdata_api/caltechdata_write.py'
16+ - ' caltechdata_api/caltechdata_edit.py'
17+ - ' README.md'
18+
19+ jobs :
20+ validate-metadata :
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 0
27+
28+ - name : Set up Python
29+ uses : actions/setup-python@v4
30+ with :
31+ python-version : ' 3.x'
32+
33+ - name : Check for Required Environment Variables
34+ env :
35+ CALTECHDATA_TOKEN : ${{ secrets.CALTECHDATA_TOKEN }}
36+ run : |
37+ if [ -z "$CALTECHDATA_TOKEN" ]; then
38+ echo "Error: CALTECHDATA_TOKEN environment variable is not set"
39+ exit 1
40+ fi
41+
42+ - name : Install dependencies
43+ run : |
44+ python -m pip install --upgrade pip
45+ pip install pytest requests s3fs cryptography
46+ pip install .
47+
48+ - name : Run CaltechDATA Metadata Validation
49+ env :
50+ CALTECHDATA_TOKEN : ${{ secrets.CALTECHDATA_TOKEN }}
51+ run : |
52+ python tests/bot_yaml.py
53+ - name : Run Unit Tests
54+ run : |
55+ cd tests
56+ pytest test_unit.py
57+ pytest test_rdm.py
You can’t perform that action at this time.
0 commit comments