-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First, it will run the unit tests, and only if they all pass, it will run the end-to-end tests (against Chrome and Firefox.)
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Run unit tests 🧪 | ||
run: yarn test | ||
end-to-end-tests-chrome: | ||
needs: unit-tests | ||
runs-on: ubuntu-latest | ||
container: cypress/base:16.5.0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
install-command: yarn install | ||
runTests: false | ||
- name: Install Cypress | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
runTests: false | ||
- name: Run end-to-end tests on Chrome 🧪 | ||
uses: cypress-io/github-action@v2 | ||
env: | ||
API_URL: ${{ secrets.API_URL }} | ||
PORT: ${{ secrets.PORT }} | ||
MONGODB_LOCAL_URL: ${{ secrets.MONGODB_LOCAL_URL }} | ||
CYPRESS_user: ${{ secrets.CYPRESS_user }} | ||
CYPRESS_password: ${{ secrets.CYPRESS_password }} | ||
with: | ||
install: false | ||
start: | | ||
yarn start:dev | ||
yarn start:frontend | ||
command: yarn test:cy | ||
end-to-end-tests-firefox: | ||
needs: unit-tests | ||
runs-on: ubuntu-latest | ||
container: cypress/base:16.5.0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
install-command: yarn install | ||
runTests: false | ||
- name: Install Cypress | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
runTests: false | ||
- name: Run end-to-end tests on Firefox 🧪 | ||
uses: cypress-io/github-action@v2 | ||
env: | ||
API_URL: ${{ secrets.API_URL }} | ||
PORT: ${{ secrets.PORT }} | ||
MONGODB_LOCAL_URL: ${{ secrets.MONGODB_LOCAL_URL }} | ||
CYPRESS_user: ${{ secrets.CYPRESS_user }} | ||
CYPRESS_password: ${{ secrets.CYPRESS_password }} | ||
with: | ||
install: false | ||
start: | | ||
yarn start:dev | ||
yarn start:frontend | ||
command: yarn test:cy:firefox |