Merge content from rohan #5
Workflow file for this run
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
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 caltechdata_api | |
- 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 |