-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.61 KB
/
cypress.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Cypress Tests
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set environment variables
run: |
echo PEM_CERT_PATH=$(pwd)/certs/geopilot.pem >> $GITHUB_ENV
echo UBUNTU_TRUSTED_CERT_PATH=/usr/local/share/ca-certificates/geopilot.crt >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0"
- name: Create dev-certs
run: |
mkdir ./certs
dotnet dev-certs https --export-path ${{ env.PEM_CERT_PATH }} --no-password --format PEM
chmod -R 664 ./certs/*
- name: Trust dev-certs
run: |
sudo apt-get install -y ca-certificates
sudo cp ${{ env.PEM_CERT_PATH }} ${{ env.UBUNTU_TRUSTED_CERT_PATH }}
sudo update-ca-certificates
- name: Start db and api's
run: docker compose up --wait
- name: Cypress run
uses: cypress-io/github-action@v6
with:
command: npx cypress run --record --parallel --key ${{ secrets.CYPRESS_RECORD_KEY }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}
wait-on: "https://localhost:5173"
wait-on-timeout: 120
working-directory: ./src/Geopilot.Frontend
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_EXTRA_CA_CERTS: ${{ env.UBUNTU_TRUSTED_CERT_PATH }}