Skip to content

T351720 GH actions based release automation #1183

T351720 GH actions based release automation

T351720 GH actions based release automation #1183

Workflow file for this run

name: 🏗️🧪 Build and Test
on:
push:
branches:
- "main"
- "mw-*"
pull_request:
paths-ignore:
- "docs/**"
- "**/*.md"
- "**/*.txt"
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Lint
run: ./lint.sh
build:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
component:
[
"wikibase",
"elasticsearch",
"wdqs",
"wdqs-frontend",
"wdqs-proxy",
"quickstatements",
]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build
with:
component: ${{ matrix.component }}
github_token: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
suite:
[
repo,
fedprops,
repo_client,
quickstatements,
pingback,
confirm_edit,
elasticsearch,
base__repo,
base__repo_client,
base__pingback,
base__fedprops,
example,
]
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pull-ghcr
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: ./test.sh ${{ matrix.suite }}
- name: Report Selenium
if: always()
run: |
cd .github/reporter
npm install
node report.js ${{ matrix.suite }}
- name: Show Logs
if: always()
continue-on-error: true
run: |
ls -lahr test/suites/${{ matrix.suite }}/results test/suites/${{ matrix.suite }}/results/*
tail -n +1 test/suites/${{ matrix.suite }}/results/*.log
- name: Archive Docker test artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: TestResults
path: test/suites/**/results
test_upgrade:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# TODO: can we get this from the environment to not have it hardcoded in the pipeline code?
version: [
# Latest 1.37
"WMDE9",
"WMDE9_BUNDLE",
# Latest 1.38
"WMDE12",
"WMDE12_BUNDLE",
# Latest 1.39
"WMDE13",
"WMDE13_BUNDLE",
]
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pull-ghcr
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Test upgrade from ${{ matrix.version }}
# This step should only take ~5 mins to complete, but sometimes seems to lock up and use the whole job timeout
# Set a specific lower timeout to allow us to retry sooner
timeout-minutes: 10
run: ./test.sh upgrade ${{ matrix.version }}
# TODO: DRY
- name: Archive Docker test artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: TestResults
path: test/suites/**/results