ignore build_env conditional #439
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: Test | |
on: | |
push: | |
pull_request: | |
types: [reopened] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: SFDO-Tooling-Ubuntu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-docker-compose | |
with: | |
# By writing to the cache here subsequent jobs will get the updated | |
# image when they use setup-docker-compose | |
cache-to: type=gha,mode=max | |
omniout-token: ${{ secrets.OMNIOUT_TOKEN }} | |
lint: | |
name: Lint | |
needs: [build] | |
runs-on: SFDO-Tooling-Ubuntu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-docker-compose | |
with: | |
omniout-token: ${{ secrets.OMNIOUT_TOKEN }} | |
- name: Lint | |
run: docker compose run --no-deps web yarn lint:nofix | |
frontend: | |
name: Frontend | |
needs: [build] | |
runs-on: SFDO-Tooling-Ubuntu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-docker-compose | |
with: | |
omniout-token: ${{ secrets.OMNIOUT_TOKEN }} | |
- name: Test frontend | |
run: docker compose run --no-deps web yarn test:js:coverage | |
- name: Upload coverage artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frontend-coverage | |
path: | | |
coverage | |
backend: | |
name: Backend | |
needs: [build] | |
runs-on: SFDO-Tooling-Ubuntu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-docker-compose | |
with: | |
omniout-token: ${{ secrets.OMNIOUT_TOKEN }} | |
- name: Test backend | |
# prettier-ignore | |
run: > | |
docker compose run | |
-e DB_ENCRYPTION_KEY=MMkDMBfYL0Xoz3Xu1ENs3AkdCZdJoks5PNlUBkK7KDc= | |
-e DJANGO_DEBUG=false | |
-e SECURE_SSL_REDIRECT=false | |
-e GITHUB_TOKEN="sample token" | |
-e SFDX_CLIENT_SECRET="sample secret" | |
-e SFDX_CLIENT_CALLBACK_URL="sample callback" | |
-e SFDX_CLIENT_ID="sample id" | |
-e SFDX_HUB_KEY="sample key" | |
web yarn test:py | |
- name: Upload coverage artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: backend-coverage | |
path: | | |
.coverage | |
coverage.xml | |
coverage: | |
name: Coverage | |
needs: [frontend, backend] | |
runs-on: SFDO-Tooling-Ubuntu | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-docker-compose | |
with: | |
omniout-token: ${{ secrets.OMNIOUT_TOKEN }} | |
- name: Download frontend coverage artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: frontend-coverage | |
path: coverage | |
- name: Download backend coverage artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: backend-coverage | |
- name: Upload coverage reports | |
if: env.COVERALLS_REPO_TOKEN | |
# prettier-ignore | |
run: > | |
docker-compose run | |
-e COVERALLS_REPO_TOKEN | |
-e COVERALLS_PARALLEL=true | |
-e COVERALLS_SERVICE_NUMBER="${{ github.run_id }}" | |
-e CI_BUILD_NUMBER="${{ github.run_id }}" | |
--no-deps | |
web bash -c ' | |
yarn test:js:report-coverage && | |
yarn test:py:report-coverage && | |
python -m coveralls --finish | |
' | |
- name: Check coverage | |
run: | | |
docker-compose run --no-deps web yarn test:js:check-coverage | |
docker-compose run --no-deps web yarn test:py:check-coverage |