Skip to content

Commit

Permalink
Merge pull request #3827 from coronasafe/develop
Browse files Browse the repository at this point in the history
Production Release; Oct Week 4
  • Loading branch information
mathew-alex authored Oct 25, 2022
2 parents a237281 + 14b24c2 commit c60fcbe
Show file tree
Hide file tree
Showing 38 changed files with 877 additions and 1,222 deletions.
34 changes: 0 additions & 34 deletions .github/stale.yml

This file was deleted.

38 changes: 23 additions & 15 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,57 @@ on:

jobs:
cypress-run:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout 📥
uses: actions/checkout@v3

- name: Checkout care
- name: Checkout care 📥
uses: actions/checkout@v3
with:
repository: coronasafe/care
path: care

- name: Docker Layer Caching
- name: Docker Layer Caching 🍥
uses: satackey/[email protected]

- name: Compose Up Care
- name: Run docker compose up on care 🐳
run: cd care && touch .env && make build && make up && cd .. && sleep 30s
# Voluntarily kept 30 seconds delay to wait for migrations to complete.

- run: docker exec care python manage.py collectstatic
- run: docker exec care python manage.py load_dummy_data
- name: Run Django collectstatic and load dummy data on care 🐍
run: |
docker exec care python manage.py collectstatic
docker exec care python manage.py load_dummy_data
- name: Check if care is up
- name: Check care is up
run: curl -o /dev/null -s -w "%{http_code}\n" http://localhost:9000

- name: Replace proxy with local care
- name: Change api proxy url 📝
run: 'sed --in-place "s^\"proxy\": .*,^\"proxy\": \"http://localhost:9000\",^g" package.json'

- run: yarn install
- name: Cypress run
- name: Install dependencies 📦
run: npm install --legacy-peer-deps

- name: Cypress run 🥬
uses: cypress-io/github-action@v4
with:
install: false
start: yarn start
start: npm run start
wait-on: "http://localhost:4000"
wait-on-timeout: 300
browser: electron
- uses: actions/upload-artifact@v2

- name: Upload cypress screenshots on failure 📸
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v2
- name: Upload cypress videos 📹
uses: actions/upload-artifact@v2
if: always()
with:
name: cypress-videos
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "0 4 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: "stale"
stale-pr-label: "stale"
stale-issue-message: "Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity."
stale-pr-message: "Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions."
close-pr-message: "Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr."
exempt-issue-labels: "blocked,waiting for related PR,waiting for back end,help wanted"
exempt-pr-labels: "tested,needs testing,need Review,waiting for related PR,waiting for back end,help wanted,blocked"
days-before-issue-stale: 14
days-before-pr-stale: 7
days-before-issue-close: -1
days-before-pr-close: 7
5 changes: 4 additions & 1 deletion cypress/e2e/facility_spec/facility.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,15 @@ describe("Facility", () => {
cy.get("[id=bed-capacity-cancel]").click();

// add doctor information
cy.get("button")
.should("contain", "Add Doctor Types")
.contains("Add Doctor Types")
.click({ force: true });
cy.url().should("include", "doctor");
cy.get("[id=area-of-specialization]").select("1");
cy.get("[id=count]").type("15");
cy.get("[id=doctor-save").click();
cy.verifyNotification("Doctor count added successfully");

cy.url().should("include", "doctor");
cy.get("[id=doctor-cancel").click();
cy.url().then((url) => {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

const username = "devdistrictadmin";
const password = "Coronasafe@123";
const phone_number = "9" + parseInt(Math.random() * 10 ** 9).toString();
const phone_number = "9" + parseInt((Math.random() * 10 ** 9).toString());
const emergency_phone_number = "9430123487";
let patient_url = "";

Expand Down Expand Up @@ -50,8 +50,8 @@ describe("Patient Creation", () => {
emergency_phone_number,
{ delay: 100 }
);
cy.get("[data-testid=pincode] input").click();
cy.get("[data-testid=submit-button]").click();
cy.wait(1000);
cy.get("button").get("[data-testid=submit-button]").click();
cy.url().should("include", "/consultation");
cy.url().then((url) => {
cy.log(url);
Expand Down
Loading

0 comments on commit c60fcbe

Please sign in to comment.