Mc issue 301 test app setup issues #236
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: Pull Request | |
on: | |
pull_request: | |
jobs: | |
setup_api: | |
name: Setup API | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
lint_api: | |
name: Lint API | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
test_api: | |
env: | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
name: Test API | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Test with pytest | |
run: | | |
pip install pytest pytest-cov | |
pytest tests/resources/app_test.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html | |
setup_client: | |
defaults: | |
run: | |
working-directory: client | |
name: Setup client | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: 'client/package-lock.json' | |
- name: Install deps | |
run: npm ci | |
lint_client: | |
defaults: | |
run: | |
working-directory: client | |
name: Lint client | |
needs: setup_client | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: 'client/package-lock.json' | |
- run: npm ci | |
- name: Lint JS and Vue | |
run: npm run lint | |
test_client: | |
defaults: | |
run: | |
working-directory: client | |
name: Test client | |
needs: setup_client | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: 'client/package-lock.json' | |
- uses: szenius/set-timezone@v1.2 | |
with: | |
timezoneLinux: "America/New_York" | |
- run: npm ci | |
- name: Run tests | |
run: npm run test:ci | |
build_client: | |
defaults: | |
run: | |
working-directory: client | |
name: Build client | |
needs: setup_client | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
cache-dependency-path: 'client/package-lock.json' | |
- run: npm ci | |
- name: Build app | |
run: npm run build |