#194 - company phone and e-mail #273
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: "Checking app: testing and linting" | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-20.04 | |
name: "Checking app: testing and linting" | |
container: | |
image: cypress/browsers:node14.17.0-chrome88-ff89 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm install | |
- name: Add env values | |
run: | | |
echo 'CONTACT_FORM_URL="${{ secrets.CONTACT_FORM_URL }}"' > .env | |
echo 'CONTACT_FORM_EMAIL_NAME="${{ secrets.CONTACT_FORM_EMAIL_NAME }}"' >> .env | |
echo 'CONTACT_FORM_QUESTION_NAME="${{ secrets.CONTACT_FORM_QUESTION_NAME }}"' >> .env | |
echo 'MAPBOX_STYLE="${{ secrets.MAPBOX_STYLE }}"' >> .env | |
echo 'MAPBOX_TOKEN="${{ secrets.MAPBOX_TOKEN }}"' >> .env | |
- name: Test application | |
run: npm run test | |
- name: Lint codebase | |
run: npm run lint | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
start: npm run dev:cypress | |
wait-on: http://localhost:5173 |