Skip to content

Commit

Permalink
test: build linux artifacts for e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Oct 28, 2023
1 parent 740b4bd commit 80ac985
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/desktop-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,74 @@ on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
# TEMP
push:
jobs:
prepare-linux:
# TODO: only run if this is neither main nor a tag
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use custom container image if specified
if: ${{ github.event.inputs.override_container_image != '' }}
run: echo "inner_container_image=${{ github.event.inputs.override_container_image }}"
>> $GITHUB_ENV
- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV
outputs:
container_image: ${{ env.inner_container_image }}
build-linux:
# TODO: only run if this is neither main nor a tag
needs: prepare-linux
runs-on: ubuntu-latest
container:
image: ${{ needs.prepare-linux.outputs.container_image }}
continue-on-error: true
steps:
# Fix for HOME path overridden by GH runners when building in containers, see:
# https://github.com/actions/runner/issues/863
- name: Fix HOME path
run: echo "HOME=/root" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout binaries submodule
run: |
git config --global --add safe.directory '*'
git submodule update --init --depth=1 dist-assets/binaries
- name: Build app
env:
USE_MOLD: false
run: ./build.sh
- name: Build test executable
run: ./gui/scripts/build-test-executable.sh
- uses: actions/upload-artifact@v3
if: '!cancelled()'
with:
name: linux-build
path: |
./dist/*.rpm
./dist/*.deb
./dist/app-e2e-*
e2e-test-linux:
name: Linux end-to-end tests
needs: build-linux
if: '!cancelled()'
runs-on: [self-hosted, desktop-test, Linux] # app-test-linux
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
os: [debian11, debian12, ubuntu2004, ubuntu2204, ubuntu2304, fedora38, fedora37, fedora36]
steps:
# TODO: only if ref is not tag
- uses: actions/download-artifact@v3
with:
name: linux-build
path: ~/.cache/mullvad-test/packages
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -27,6 +85,8 @@ jobs:
name: ${{ matrix.os }}_report
path: ./test/.ci-logs/${{ matrix.os }}_report
e2e-test-windows:
# TEMP
if: false
name: Windows end-to-end tests
runs-on: [self-hosted, desktop-test, Linux] # app-test-linux
timeout-minutes: 240
Expand All @@ -49,6 +109,8 @@ jobs:
name: ${{ matrix.os }}_report
path: ./test/.ci-logs/${{ matrix.os }}_report
e2e-test-macos:
# TEMP
if: false
name: macOS end-to-end tests
runs-on: [self-hosted, desktop-test, macOS] # app-test-macos-arm
timeout-minutes: 240
Expand Down

0 comments on commit 80ac985

Please sign in to comment.