-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.21 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Automated Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17'
- name: Download selenoid (Selenium server)
run: curl -s https://aerokube.com/cm/bash | bash
- name: Give permission to selenoid (Selenium server)
run: chmod +x ./cm
- name: Start selenoid (Selenium server)
run: ./cm selenoid start --browsers 'chrome;safari' --last-versions 1
- name: Install dependencies
run: npm ci
- name: Create Service Account key for Firebase
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > gcloud.json
- name: Run tests with chrome
run: |
SELENIUM_REMOTE_URL="http://localhost:4444/wd/hub" SELENIUM_BROWSER=chrome npm test
env:
TOKEN: ${{ secrets.TOKEN }}
GOOGLE_APPLICATION_CREDENTIALS: "gcloud.json"
MERCHANTID: ${{ secrets.MERCHANTID }}
MERCHANTPUBLIC: ${{ secrets.MERCHANTPUBLIC }}
MERCHANTPRIVATE: ${{ secrets.MERCHANTPRIVATE }}
- name: Stop selenoid (Selenium server)
run: ./cm selenoid stop