Skip to content

more fix to the action #628

more fix to the action

more fix to the action #628

name: Test
on:
push:
pull_request:
jobs:
docker:
name: Build and test
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start containers
run: |
mv .env.sample .env
docker compose -f "docker-compose.production.yaml" up -d --build --quiet-pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python environment
run: pip install .
- name: Run ERDDAP harvester on sample dataset
run: python -m cde_harvester --urls https://data.cioospacific.ca/erddap/ --dataset_ids DFO_MEDS_BUOYS --folder erddap_harvest
- name: Load harvested data into the DB
run: python -m cde_db_loader --folder erddap_harvest
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
working-directory: ./test
run: npm ci --quiet
- name: Test API endpoints
working-directory: ./test
run: node test_api_endpoints.js
- name: Test frontend loads without errors
working-directory: ./test
run: node frontend_loads_without_errors.js
- name: Stop containers
if: always()
run: docker compose -f "docker-compose.production.yaml" down