task/WI-38: Migrate to Postgres database backend #1099
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 | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ '**' ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Server_Side_Unit_Tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install Poetry | |
run: | | |
pip3 install poetry | |
- name: Copy base.html for use in unit tests | |
run: | | |
cp --force designsafe/templates/base.j2 designsafe/templates/base.html | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- run: | | |
poetry config virtualenvs.create false | |
poetry install | |
pip install -e git+https://bitbucket.org/taccaci/pytas.git@1e6e488716fd42437c568acad161ae54d0077446#egg=pytas | |
- name: Run Server-side unit tests and generate coverage report | |
run: | | |
pytest --cov-config=.coveragerc --cov=designsafe --cov-report=xml -ra designsafe | |
Client_Side_Unit_Tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Client Side Unit Tests | |
run: | | |
npm ci | |
npm run test |