2022-05-13 23:52:35 +02:00
|
|
|
name: "Windows Build"
|
2021-02-20 10:13:44 +01:00
|
|
|
|
|
|
|
# any branch is useful for testing before a PR is submitted
|
2024-03-23 22:10:21 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "doc/**"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "doc/**"
|
2021-02-20 10:13:44 +01:00
|
|
|
|
2022-04-26 03:08:54 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-02-20 10:13:44 +01:00
|
|
|
jobs:
|
2022-05-13 23:52:35 +02:00
|
|
|
build-zip:
|
2024-08-09 11:39:21 +02:00
|
|
|
permissions: write-all
|
2021-02-20 10:13:44 +01:00
|
|
|
# run on pushes to any branch
|
|
|
|
# run on PRs from external forks
|
|
|
|
if: |
|
2022-01-28 07:33:52 +01:00
|
|
|
(github.event_name != 'pull_request')
|
|
|
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
2022-05-13 23:52:35 +02:00
|
|
|
name: Build .zip
|
2021-02-24 04:13:00 +01:00
|
|
|
runs-on: windows-latest
|
2021-02-20 10:13:44 +01:00
|
|
|
steps:
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
path-type: inherit
|
|
|
|
install: >-
|
|
|
|
zip
|
|
|
|
-
|
|
|
|
name: Checkout repository
|
2023-09-05 19:16:08 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2023-10-25 19:08:24 +02:00
|
|
|
uses: actions/setup-node@v4
|
2022-01-28 07:33:52 +01:00
|
|
|
with:
|
2024-06-03 22:32:06 +02:00
|
|
|
node-version: 22
|
2024-05-09 19:06:14 +02:00
|
|
|
- uses: pnpm/action-setup@v4
|
2024-02-11 09:51:42 +01:00
|
|
|
name: Install pnpm
|
|
|
|
with:
|
2024-04-24 19:08:48 +02:00
|
|
|
version: 9.0.4
|
2024-02-11 09:51:42 +01:00
|
|
|
run_install: false
|
|
|
|
- name: Get pnpm store directory
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
2024-02-11 11:19:34 +01:00
|
|
|
- uses: actions/cache@v4
|
2024-02-11 09:51:42 +01:00
|
|
|
name: Setup pnpm cache
|
|
|
|
with:
|
|
|
|
path: ${{ env.STORE_PATH }}
|
|
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Only install direct dependencies
|
|
|
|
run: pnpm config set auto-install-peers false
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
2023-09-04 21:57:10 +02:00
|
|
|
shell: msys2 {0}
|
2024-02-21 21:50:11 +01:00
|
|
|
run: bin/installDeps.sh
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
|
|
|
name: Run the backend tests
|
2023-09-04 21:57:10 +02:00
|
|
|
shell: msys2 {0}
|
2024-08-08 21:44:25 +02:00
|
|
|
working-directory: src
|
|
|
|
run: pnpm test
|
2022-01-28 07:33:52 +01:00
|
|
|
-
|
2024-08-08 20:34:40 +02:00
|
|
|
name: Run Etherpad
|
2024-08-08 21:44:25 +02:00
|
|
|
working-directory: src
|
2024-08-08 20:34:40 +02:00
|
|
|
run: |
|
|
|
|
pnpm i
|
|
|
|
pnpm exec playwright install --with-deps
|
|
|
|
pnpm run prod &
|
|
|
|
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
|
|
|
|
pnpm exec playwright install chromium --with-deps
|
|
|
|
pnpm run test-ui --project=chromium
|
2024-08-08 21:18:23 +02:00
|
|
|
# On release, create release
|
|
|
|
- name: Generate Changelog
|
2024-08-08 22:49:45 +02:00
|
|
|
if: ${{startsWith(github.ref, 'refs/tags/v') }}
|
2024-08-08 21:18:23 +02:00
|
|
|
working-directory: bin
|
2024-08-08 21:24:30 +02:00
|
|
|
run: pnpm run generateChangelog ${{ github.ref }} > ${{ github.workspace }}-CHANGELOG.txt
|
2024-08-08 21:20:29 +02:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v2
|
2023-09-24 14:05:44 +02:00
|
|
|
if: ${{startsWith(github.ref, 'refs/tags/v') }}
|
2023-09-04 21:57:10 +02:00
|
|
|
with:
|
2024-08-08 21:18:23 +02:00
|
|
|
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
2024-08-08 21:20:29 +02:00
|
|
|
make_latest: true
|