Skip to content

end2end on ubuntu-ci #1584

end2end on ubuntu-ci

end2end on ubuntu-ci #1584

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