From f442b511543af26ca8813f5ac84d3ff33dd8abe0 Mon Sep 17 00:00:00 2001 From: Jan Brasna <1784648+janbrasna@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:22:22 +0100 Subject: [PATCH 1/3] Create build and test CI workflow --- .github/workflows/test.yml | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..c1b2c2dff --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,63 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - python: "3.11" + node: 16 + os: macos-15-intel + - python: "3.12" + node: 20 + os: windows-2025 + - python: "3.13" + node: 22 + os: ubuntu-24.04 + - python: "3.14" + node: 24 + os: macos-26 + - python: "3.15-dev" + node: 25 + os: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + cache: pip + - name: Install project dependencies + run: | + npm install -g less + pip install -r requirements-dev.txt + git clone https://github.com/thunderbird/thunderbird-notes.git libs/thunderbird_notes + git clone -b production https://github.com/mozilla-releng/product-details.git libs/product-details + - name: Build site (just on darwin) + if: runner.os == 'macOS' + run: | + python build-site.py --debug --enus + - name: Build startpage (just on darwin) + if: runner.os == 'macOS' + run: | + python build-site.py --debug --enus --startpage + - name: Build tbpro (just on darwin) + if: runner.os == 'macOS' + run: | + python build-site.py --debug --enus --tbpro + # - name: Build calendars (disabled until new provider) + # run: | + # python build-site.py --debug --enus --buildcalendar + - name: Run pytest + run: | + python -m pytest tests From 6fd213d5f3968f8360bd33786707b80d7eb95d6e Mon Sep 17 00:00:00 2001 From: Jan Brasna <1784648+janbrasna@users.noreply.github.com> Date: Tue, 28 Oct 2025 12:12:39 +0100 Subject: [PATCH 2/3] Limit token scope --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1b2c2dff..104466547 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,9 @@ on: branches: - master +permissions: + contents: read + jobs: test: runs-on: ${{ matrix.os }} From 7fe2fb4f05eef786744ed83f37caeb91fe48fcb9 Mon Sep 17 00:00:00 2001 From: Jan Brasna <1784648+janbrasna@users.noreply.github.com> Date: Tue, 28 Oct 2025 19:39:29 +0100 Subject: [PATCH 3/3] Clone shallow --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 104466547..a2b156c10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,8 +44,8 @@ jobs: run: | npm install -g less pip install -r requirements-dev.txt - git clone https://github.com/thunderbird/thunderbird-notes.git libs/thunderbird_notes - git clone -b production https://github.com/mozilla-releng/product-details.git libs/product-details + git clone --depth 1 https://github.com/thunderbird/thunderbird-notes.git libs/thunderbird_notes + git clone --depth 1 -b production https://github.com/mozilla-releng/product-details.git libs/product-details - name: Build site (just on darwin) if: runner.os == 'macOS' run: |