-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 1.11 KB
/
bot.yaml
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
name: Bot validation
on:
push:
paths:
- 'caltechdata_api/cli.py'
- 'README.md'
pull_request:
paths:
- 'caltechdata_api/cli.py'
- 'README.md'
jobs:
validate-metadata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Check for Required Environment Variables
env:
CALTECHDATA_TOKEN: ${{ secrets.CALTECHDATA_TOKEN }}
run: |
if [ -z "$CALTECHDATA_TOKEN" ]; then
echo "Error: CALTECHDATA_TOKEN environment variable is not set"
exit 1
fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest requests s3fs cryptography
pip install .
- name: Run CaltechDATA Metadata Validation
env:
CALTECHDATA_TOKEN: ${{ secrets.CALTECHDATA_TOKEN }}
run: |
python tests/bot_yaml.py
- name: Run Unit Tests
run: |
cd tests
pytest test_unit.py