diff --git a/.github/workflows/scheduled_tests.yml b/.github/workflows/scheduled_tests.yml new file mode 100644 index 0000000..cff3225 --- /dev/null +++ b/.github/workflows/scheduled_tests.yml @@ -0,0 +1,51 @@ +name: Scheduled Tests + +on: + schedule: + - cron: '30 1 5 * *' # runs on the fifth day of the month at 1:30 UTC + workflow_dispatch: # manual execution + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.13"] + + steps: + - uses: actions/checkout@v4 + + - name: Check ADS_TOKEN + shell: bash + env: + ADS_TOKEN: ${{ secrets.ADS_TOKEN }} + run: | + if [[ -z "${ADS_TOKEN}" ]]; then + echo "ADS_TOKEN is not set, ADS tests will be skipped" + else + echo "ADS_TOKEN is set" + fi + + - name: Checkout template database repo + uses: actions/checkout@v4 + with: + repository: astrodbtoolkit/astrodb-template-db + path: tests/astrodb-template-db + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install .[test] + - name: Test with pytest + run: | + pytest -s