Merge pull request #430 from GNS-Science/feature/426_vite_migration #250
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: Cypress Tests | |
on: | |
push: | |
branches: | |
- main | |
- deploy-test | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: create env file | |
run: | | |
touch .env | |
echo VITE_MSW=test >> .env | |
echo VITE_DISCLAIMER_VERSION=versionOne >> .env | |
echo VITE_GRAPHQL_ENDPOINT=..../graphql >> .env | |
echo VITE_GRAPHQL_API_KEY=$##@! >> .env | |
echo GENERATE_SOURCEMAP=false >> .env | |
cat .env | |
- name: Node Setup | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@gns-science' | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
wait-on: 'http://localhost:5173' | |
record: true | |
build: yarn build | |
start: yarn preview | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.TOSHI_NEST_PACKAGE_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY}} |