Create migration_util directory, with new script for purging preview … #196
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: CI | |
on: | |
push: | |
jobs: | |
python-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.x' | |
architecture: 'x64' | |
- name: Copy .env.ci | |
run: cp .env.ci .env | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip pipenv | |
pipenv install -d | |
- name: Run tests | |
run: pipenv run pytest --cov=rainfall --cov-report=json:coverage.json | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
frontend-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get yarn cache directory path | |
id: yarn-dep-cache-dir-path | |
run: cd rainfall-frontend && echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup Yarn dep cache | |
id: yarn-dep-cache | |
with: | |
path: ${{ steps.yarn-dep-cache-dir-path.outputs.YARN_CACHE_DIR }} | |
key: ${{ runner.os }}-yarn-dep-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-dep- | |
- name: Install Javascript dependencies | |
run: cd rainfall-frontend && yarn install --frozen-lockfile | |
- name: Start frontend server | |
run: | | |
cd rainfall-frontend | |
yarn dev --port 4173 & | |
- name: Wait for frontend server to be up (10s) | |
run: sleep 5s | |
shell: bash | |
- name: Run frontend tests | |
run: | | |
cd rainfall-frontend | |
$(yarn bin)/cypress run --e2e | |
- uses: actions/upload-artifact@v3 | |
continue-on-error: true | |
if: always() | |
with: | |
name: screenshots | |
path: rainfall-frontend/cypress/screenshots/* | |
build-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Javascript dependencies | |
run: cd rainfall-frontend && yarn install --frozen-lockfile | |
- name: Frontend builds successfully | |
run: | | |
cd rainfall-frontend | |
yarn run build |