Multiple fixes for path-related issues and other stuff... #3102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| integration_test_repository: | |
| description: 'Integration testing repository path' | |
| required: true | |
| default: 'psilabs-dev/aio-lanraragi' | |
| integration_test_ref: | |
| description: 'Integration testing repository git commit hash or branch' | |
| required: true | |
| default: '328c792313f24d667c73377fd67aadfa7df72d26' | |
| env: | |
| INTEGRATION_TEST_REPOSITORY: ${{ github.event.inputs.integration_test_repository || 'psilabs-dev/aio-lanraragi' }} | |
| INTEGRATION_TEST_REF: ${{ github.event.inputs.integration_test_ref || '328c792313f24d667c73377fd67aadfa7df72d26' }} | |
| name: "Continuous Integration \U0001F44C\U0001F440" | |
| jobs: | |
| testSuite: | |
| name: Run Test Suite and Perl Critic | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Test Docker Build | |
| run: | | |
| docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile . | |
| - name: LANraragi Test Suite | |
| uses: ./.github/action-run-tests | |
| - name: Perl Critic | |
| uses: Difegue/action-perlcritic@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| args: ./lib/* ./script/* ./tools/install.pl | |
| integrationTestsDocker: | |
| name: Run Docker Integration Tests | |
| runs-on: ubuntu-latest | |
| needs: testSuite | |
| steps: | |
| - name: Checkout LANraragi repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: lanraragi | |
| - name: Checkout aio-lanraragi integration tests | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.INTEGRATION_TEST_REPOSITORY }} | |
| ref: ${{ env.INTEGRATION_TEST_REF }} | |
| path: aio-lanraragi | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install aio-lanraragi package | |
| run: | | |
| cd aio-lanraragi | |
| python -m pip install --upgrade pip | |
| pip install ".[dev]" | |
| - name: Install integration test dependencies | |
| run: | | |
| cd aio-lanraragi/integration_tests | |
| pip install . | |
| playwright install | |
| - name: Run integration tests against local LANraragi build | |
| run: | | |
| cd aio-lanraragi/integration_tests | |
| export CI=true | |
| pytest tests --log-cli-level=INFO \ | |
| --build "$GITHUB_WORKSPACE/lanraragi" \ | |
| --playwright \ | |
| --docker-api \ | |
| --npseed 42 | |
| env: | |
| DOCKER_HOST: unix:///var/run/docker.sock | |
| integrationTestsWindows: | |
| name: Run Windows Integration Tests | |
| runs-on: windows-2025 | |
| needs: testSuite | |
| steps: | |
| - name: Checkout LANraragi repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: lanraragi | |
| - name: Setup MSYS2 UCRT64 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| update: true | |
| # Keep in sync with tools/build/windows/install-deps.sh | |
| install: >- | |
| mingw-w64-ucrt-x86_64-perl | |
| mingw-w64-ucrt-x86_64-perl-win32-api | |
| mingw-w64-ucrt-x86_64-openssl | |
| mingw-w64-ucrt-x86_64-imagemagick | |
| mingw-w64-ucrt-x86_64-libjxl | |
| mingw-w64-ucrt-x86_64-libheif | |
| mingw-w64-ucrt-x86_64-ghostscript | |
| mingw-w64-ucrt-x86_64-zlib | |
| mingw-w64-ucrt-x86_64-lzo2 | |
| mingw-w64-ucrt-x86_64-libarchive | |
| mingw-w64-ucrt-x86_64-ca-certificates | |
| mingw-w64-ucrt-x86_64-libvips | |
| libxcrypt | |
| unzip | |
| mingw-w64-ucrt-x86_64-gcc | |
| mingw-w64-ucrt-x86_64-make | |
| make | |
| mingw-w64-ucrt-x86_64-diffutils | |
| libbz2-devel | |
| patch | |
| mingw-w64-ucrt-x86_64-nodejs | |
| mingw-w64-ucrt-x86_64-tools-git | |
| - name: Build | |
| shell: msys2 {0} | |
| working-directory: LANraragi | |
| run: | | |
| ./tools/build/windows/install.sh | |
| ./tools/build/windows/cleanup.sh | |
| ./tools/build/windows/create-dist.sh | |
| - name: Enable UTF-8 | |
| working-directory: LANraragi | |
| run: | | |
| ./tools/build/windows/utf8-support.ps1 | |
| - name: Checkout aio-lanraragi integration tests | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.INTEGRATION_TEST_REPOSITORY }} | |
| ref: ${{ env.INTEGRATION_TEST_REF }} | |
| path: aio-lanraragi | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install main package (aio-lanraragi) | |
| working-directory: aio-lanraragi | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[dev]" | |
| - name: Install integration test dependencies | |
| working-directory: aio-lanraragi/integration_tests | |
| run: | | |
| pip install . | |
| playwright install | |
| - name: Create staging directory | |
| run: | | |
| New-Item -ItemType Directory -Path "$env:GITHUB_WORKSPACE\staging" -Force | Out-Null | |
| - name: Run integration tests against local LANraragi build | |
| working-directory: aio-lanraragi/integration_tests | |
| timeout-minutes: 30 | |
| run: | | |
| $env:CI='true' | |
| pytest tests ` | |
| --log-cli-level=INFO ` | |
| --windist "$env:GITHUB_WORKSPACE\LANraragi\win-dist" ` | |
| --staging "$env:GITHUB_WORKSPACE\staging" ` | |
| --playwright ` | |
| --npseed 42 |