diff options
| author | Albin <albin@mullvad.net> | 2023-03-16 12:16:55 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2023-03-16 12:16:55 +0100 |
| commit | f5c0eca530eef397ec64736b13e1fed241813fe8 (patch) | |
| tree | 2a857ffbe3bfc9a692ef5a459acc1df166863fff | |
| parent | ba8c093a8609c3f4535d8002bd8304c35b13d9b0 (diff) | |
| parent | 2352191e32d684785914c47109b1a1ce4ab2b9af (diff) | |
| download | mullvadvpn-f5c0eca530eef397ec64736b13e1fed241813fe8.tar.xz mullvadvpn-f5c0eca530eef397ec64736b13e1fed241813fe8.zip | |
Merge branch 'migrate-tidy-action-to-container-droid-34'
| -rw-r--r-- | .github/workflows/android-xml-tidy.yml | 29 | ||||
| -rw-r--r-- | android/scripts/ci-android-xml.sh | 3 |
2 files changed, 28 insertions, 4 deletions
diff --git a/.github/workflows/android-xml-tidy.yml b/.github/workflows/android-xml-tidy.yml index 12d38872ca..52328c9324 100644 --- a/.github/workflows/android-xml-tidy.yml +++ b/.github/workflows/android-xml-tidy.yml @@ -7,11 +7,34 @@ on: - android/app/src/main/**/*.xml workflow_dispatch: jobs: + prepare: + name: Prepare + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Resolve container image + run: | + echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV + outputs: + container_image: ${{ env.inner_container_image }} + xml-tidy: + name: Build app and run unit tests + needs: prepare runs-on: ubuntu-latest + container: + image: ${{ needs.prepare.outputs.container_image }} steps: - - uses: actions/checkout@v3 - - run: |- - sudo apt-get install tidy + # 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: Run tidy + shell: bash + run: |- + git config --global --add safe.directory $(pwd) source android/scripts/ci-android-xml.sh tidy-verify-xml diff --git a/android/scripts/ci-android-xml.sh b/android/scripts/ci-android-xml.sh index 1d7c46020a..0fd552b3a6 100644 --- a/android/scripts/ci-android-xml.sh +++ b/android/scripts/ci-android-xml.sh @@ -1,7 +1,8 @@ +#!/usr/bin/env bash + # CI/Developer script to format # Relies on Tidy - https://github.com/htacg/tidy-html5 - # Autoformats Android XML files function tidy-up-android-xml { tidy -xml \ |
