-
-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (85 loc) · 3.1 KB
/
end2end-ubuntu-ci.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
on:
workflow_dispatch:
schedule:
- cron: '45 0 * * *'
pull_request:
branches: [ master ]
paths:
- 'starsky-tools/end2end/**'
- '.github/workflows/end2end-ubuntu-ci.yml'
name: end2end on ubuntu-ci
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
WEBSITE_SITE_NAME: "ci"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create temp folder
shell: bash
id: create_temp_folder
run: mkdir starsky-run && cd starsky-run && echo "folder_path=$(pwd)" >> $GITHUB_OUTPUT && cat $GITHUB_OUTPUT
- name: github-artifacts-download
shell: bash
working-directory: ./starsky/starsky
run: bash github-artifacts-download.sh --output ${{ steps.create_temp_folder.outputs.folder_path }} --token ${{ secrets.GITHUB_TOKEN }}
- name: pm2-new-instance
shell: bash
working-directory: ./starsky/starsky
run: bash pm2-new-instance.sh --output ${{ steps.create_temp_folder.outputs.folder_path }} || true
- name: Test service
shell: bash
working-directory: ./starsky/starsky
run: |
cp service-deploy-systemd.sh "${{ steps.create_temp_folder.outputs.folder_path }}/service-deploy-systemd_temp.sh"
cd ${{ steps.create_temp_folder.outputs.folder_path }}
echo ${{ steps.create_temp_folder.outputs.folder_path }}
ls -lah | grep service-
bash service-deploy-systemd_temp.sh --anywhere --port 4000 --no-telemetry
- name: Test service starskygeocli
shell: bash
working-directory: ${{ steps.create_temp_folder.outputs.folder_path }}
run: |
./starskygeocli -h -v
./starskyadmincli -h -v
- name: pm2-warmup
shell: bash
working-directory: ./starsky/starsky
run: bash pm2-warmup.sh --port 4000
- name: logging
shell: bash
if: ${{ always() }}
run: |
systemctl --user -l status starsky
- name: Run Cypress in Electron
uses: cypress-io/github-action@v6
env:
CYPRESS_BASE_URL: http://localhost:4000
cypress_name: local
cypress_AUTH_USER: [email protected]
cypress_AUTH_PASS: [email protected]
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
with:
install-command: npm ci --legacy-peer-deps --no-fund --no-audit
command: npm run e2e:env:record -- --tag "ubuntu-ci"
working-directory: starsky-tools/end2end
- name: Upload screenshots (always)
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: cypress-screenshots
path: starsky-tools/end2end/cypress/screenshots
- name: Upload videos (always)
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: cypress-videos
path: starsky-tools/end2end/cypress/videos
- name: logging2
shell: bash
if: ${{ always() }}
run: |
systemctl --user -l status starsky