Skip to content

Bug/WP-361: Jobs Search - restrict search to a specific portal #5704

Bug/WP-361: Jobs Search - restrict search to a specific portal

Bug/WP-361: Jobs Search - restrict search to a specific portal #5704

Workflow file for this run

name: CI
# Controls when the action will run. Triggers the workflow on pushes to main or on pull request events
on:
push:
branches: [ main ]
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-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.2
- uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Python Packages
run: |
cd server
poetry install
- name: Run Server-side unit tests and generate coverage report
run: |
cd server
cp portal/apps/workbench/templates/portal/apps/workbench/index.j2 portal/apps/workbench/templates/portal/apps/workbench/index.html
poetry run pytest --cov-config=.coveragerc --cov=portal --cov-report=xml -ra
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./server/coverage.xml
flags: unittests
name: cep-server-side
fail_ci_if_error: true
Server_Side_Linting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.2
- uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Python Packages
run: |
cd server
poetry install
- name: Server-Side Linting
run: |
cd server
poetry run flake8
Client_Side_Unit_Tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Node.js for use with actions
uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci
run: |
cd client
npm ci
- name: Client Side Unit Tests
run: |
cd client
npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: javascript
fail_ci_if_error: true
Client_Side_Linting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Node.js for use with actions
uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci
run: |
cd client
npm ci
- name: Client Side Linting
run: |
cd client
npm run lint