try try try try #1
Workflow file for this run
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: | ||
workflow_call: | ||
jobs: | ||
build-dev-runner: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hoverkraft-tech/compose-action@v2.0.1 | ||
# with: | ||
# up-flags: --no-start | ||
- run: | | ||
docker network create wbs-dev > /dev/null | ||
docker compose build runner | ||
- uses: ./.github/actions/push-ghcr | ||
with: | ||
docker_image: wbs-dev-runner | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
lint: | ||
needs: build-dev-runner | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/pull-ghcr | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: hoverkraft-tech/compose-action@v2.0.1 | ||
- run: ./nx lint | ||
build: | ||
needs: build-dev-runner | ||
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/pull-ghcr | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: hoverkraft-tech/compose-action@v2.0.1 | ||
- run: ./nx build ${{ matrix.component }} | ||
# TODO re-enable as soon as we make use of it | ||
# - name: Scan Image | ||
# uses: ./.github/actions/scan-image | ||
# continue-on-error: true | ||
# with: | ||
# image_name: ${{ matrix.component }} | ||
- uses: ./.github/actions/push-ghcr | ||
with: | ||
docker_image: wikibase/${{ matrix.component }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
suite: | ||
- repo | ||
- fedprops | ||
- repo_client | ||
- quickstatements | ||
- pingback | ||
- confirm_edit | ||
- elasticsearch | ||
- deploy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/pull-ghcr | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: hoverkraft-tech/compose-action@v2.0.1 | ||
- run: ./nx test -- ${{ matrix.suite }} | ||
- name: Reporter | ||
run: | | ||
cd .github/reporter | ||
npm install | ||
node report.js ${{ matrix.suite }} | ||
- name: Show logs | ||
run: | | ||
ls -lahr test/suites/${{ matrix.suite }}/results test/suites/${{ matrix.suite }}/results/* | ||
tail -n +1 test/suites/${{ matrix.suite }}/results/*.log | ||
continue-on-error: true | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: TestResults | ||
path: test/suites/**/results | ||
test-success: | ||
# Post-test CI step - to check all tests succeeded | ||
# Github Branch Protection rules require this to pass to allow merging | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
- test | ||
steps: | ||
- run: true |