Single zip #1
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: frontend | |
on: | |
merge_group: | |
pull_request: | |
jobs: | |
frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install dependencies | |
run: | | |
yarn | |
- name: Test Javascript | |
run: yarn run test | |
- name: Store test coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frontend_coverage | |
path: ./test/unit_test_coverage/clover.xml | |
- name: Build Javascript | |
run: yarn build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frontend_${{ github.sha }} | |
path: ./cfgov/static_built/ | |
coverage: | |
runs-on: ubuntu-latest | |
needs: | |
- frontend | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/ci.txt | |
- name: Retrieve frontend coverage | |
uses: actions/download-artifact@v3 | |
with: | |
name: frontend_coverage | |
path: frontend_coverage | |
- name: Check frontend test coverage | |
run: | | |
diff-cover frontend_coverage/clover.xml --compare-branch=origin/main --fail-under=100 |