From 0119d86c682e57259fe43243553acd90aa44ccba Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 27 Sep 2023 22:16:56 -0700 Subject: [PATCH] ops: set up CI --- .github/workflows/cypress.yml | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/cypress.yml diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml new file mode 100644 index 0000000..671d509 --- /dev/null +++ b/.github/workflows/cypress.yml @@ -0,0 +1,78 @@ +# https://docs.cypress.io/guides/continuous-integration/github-actions + +name: Cypress integration tests + +on: push + +jobs: + + install: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Cypress install + uses: cypress-io/github-action@v6 + with: + # Disable running of tests within install job + runTests: false + build: npm run build + - name: Save build folder + uses: actions/upload-artifact@v3 + with: + name: build + if-no-files-found: error + path: build + + cypress-run: + needs: install + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download the build folder + uses: actions/download-artifact@v3 + with: + name: build + path: build + - name: "Cypress run (browser: default electron)" + uses: cypress-io/github-action@v6 + with: + build: npm run build + start: npm start + + cypress-run-chrome: + needs: install + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download the build folder + uses: actions/download-artifact@v3 + with: + name: build + path: build + - name: "Cypress run (browser: Chrome)" + uses: cypress-io/github-action@v6 + with: + build: npm run build + start: npm start + browser: chrome + + cypress-run-edge: + needs: install + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download the build folder + uses: actions/download-artifact@v3 + with: + name: build + path: build + - name: "Cypress run (browser: Edge)" + uses: cypress-io/github-action@v6 + with: + build: npm run build + start: npm start + browser: edge