Skip to content

Add unit tests

Add unit tests #33

Workflow file for this run

name: Update Wiki
on:
workflow_dispatch:
push:
branches: ["main"]
permissions:
contents: write
concurrency:
group: update-wiki-${{ github.ref }}
cancel-in-progress: true
jobs:
wiki:
name: Update Wiki
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ github.token }}
submodules: recursive
fetch-depth: 0
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
uses: php-actions/composer@v6
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ github.token }}"} }'
with:
php_version: '8.3'
- name: Create Docs Markdown
uses: php-actions/composer@v6
with:
php_version: '8.3'
command: 'dev-tools'
args: 'wiki -- --target=.github/wiki'
- name: Prepare wiki submodule branch
id: wiki_branch
working-directory: .github/wiki
run: |
git fetch origin
git checkout master || git checkout -b master
echo "branch=master" >> "$GITHUB_OUTPUT"
- name: Commit & push wiki submodule
id: wiki_commit
uses: EndBug/add-and-commit@v10
with:
cwd: .github/wiki
add: .
message: "Update wiki docs"
default_author: github_actions
pull: "--rebase --autostash"
push: true
- name: Commit parent repo submodule pointer
if: steps.wiki_commit.outputs.committed == 'true'
id: parent_commit
uses: EndBug/add-and-commit@v10
with:
add: .github/wiki
message: "Update wiki submodule pointer"
default_author: github_actions
pull: "--rebase --autostash"
push: true