Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3f12896
chore: update BOOTSTRAP_VERSION to v1.0.9
keyman-server Jan 19, 2026
d0ad44c
Merge pull request #175 from keymanapp/auto/update-bootstrap-version-…
keyman-status Jan 19, 2026
1746b34
chore: update BOOTSTRAP_VERSION to v1.0.10
keyman-server Feb 13, 2026
e407adf
Merge pull request #177 from keymanapp/auto/update-bootstrap-version-…
keyman-status Feb 13, 2026
5fca25f
maint: improve bootstrap resilience
mcdurdin Feb 15, 2026
f52b7be
Merge pull request #178 from keymanapp/maint/bootstrap-resilience
mcdurdin Feb 16, 2026
68152b0
chore: update BOOTSTRAP_VERSION to v1.0.11
keyman-server Mar 10, 2026
90108fa
Merge pull request #180 from keymanapp/auto/update-bootstrap-version-…
keyman-status Mar 10, 2026
75a135e
maint: Update GitHub actions to Node 24
darcywong00 Mar 16, 2026
d0137f3
Apply suggestions from code review
darcywong00 Mar 16, 2026
2101d3e
Merge pull request #182 from keymanapp/maint/gha-24
darcywong00 Mar 16, 2026
91a8679
chore: Update links about SIL Global
darcywong00 Apr 22, 2026
f4574b6
Merge pull request #185 from keymanapp/chore/sil-about
darcywong00 May 11, 2026
ccff77b
chore: update BOOTSTRAP_VERSION to v1.0.12
keyman-server May 19, 2026
a8850c3
Merge pull request #186 from keymanapp/auto/update-bootstrap-version-…
keyman-status May 19, 2026
e8eb9e9
chore: composer update to refresh composer.lock
mcdurdin May 21, 2026
b773d1d
Merge pull request #187 from keymanapp/chore/composer-2.0
mcdurdin May 21, 2026
03b89d2
chore: update composer.json and composer.lock for allow-plugins
mcdurdin May 29, 2026
495d12a
Merge pull request #189 from keymanapp/chore/update-composer-json-plu…
mcdurdin May 29, 2026
f336573
chore: update BOOTSTRAP_VERSION to v1.0.13
keyman-server Jun 8, 2026
a7641b7
Merge pull request #191 from keymanapp/auto/update-bootstrap-version-…
keyman-status Jun 8, 2026
c7641cd
chore: linkinator
mcdurdin Jun 15, 2026
f5c5d3a
chore: update multi-labeler to 5.0.0
mcdurdin Jun 16, 2026
6c542af
Merge pull request #195 from keymanapp/chore/1607-multi-labeler-5.0.0
mcdurdin Jun 16, 2026
4e67f81
chore: update BOOTSTRAP_VERSION to v1.0.14
keyman-server Jun 16, 2026
889e8f2
Merge pull request #198 from keymanapp/auto/update-bootstrap-version-…
keyman-status Jun 16, 2026
d062dd0
Merge branch 'master' into chore/linkinator
mcdurdin Jun 16, 2026
6e4cfa1
chore: verify bootstrap version format before merge
mcdurdin Jun 16, 2026
fc0da40
Merge branch 'chore/linkinator' into chore/verify-bootstrap-version
mcdurdin Jun 16, 2026
c87af03
Merge pull request #197 from keymanapp/chore/verify-bootstrap-version
mcdurdin Jun 17, 2026
ccd5d63
Apply suggestion from @ermshiperete
mcdurdin Jun 17, 2026
efb3bc2
Merge pull request #193 from keymanapp/chore/linkinator
mcdurdin Jun 17, 2026
f1c378f
chore: update BOOTSTRAP_VERSION to v1.0.15
keyman-server Jun 18, 2026
80321cc
Merge pull request #199 from keymanapp/auto/update-bootstrap-version-…
keyman-status Jun 18, 2026
77139cc
chore: add-to-project v2.0.0
mcdurdin Jun 24, 2026
1b990c3
Merge pull request #203 from keymanapp/chore/698-add-to-project-v2.0.0
mcdurdin Jun 24, 2026
a4891aa
chore: update BOOTSTRAP_VERSION to v1.0.16
keyman-server Jul 2, 2026
697bd5f
Merge pull request #204 from keymanapp/auto/update-bootstrap-version-…
keyman-status Jul 2, 2026
a812cca
chore: update BOOTSTRAP_VERSION to v1.0.17
keyman-server Jul 2, 2026
c877d1b
Merge pull request #205 from keymanapp/auto/update-bootstrap-version-…
keyman-status Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/add-to-keyman-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Add new issues and pull requests to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
- uses: actions/add-to-project@v2.0.0
with:
project-url: https://github.com/orgs/keymanapp/projects/1
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4.1.5
uses: actions/checkout@v6.0.2
with:
sparse-checkout: |
README.md
Expand Down
86 changes: 56 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ jobs:
runs-on: ubuntu-latest
env:
KEYMANHOSTS_TIER: TIER_TEST
CONTAINER_DESC: web-keyman-com-app
CONTAINER_PORT: 8057

# Composer started complaining about running as root, but we don't care in a GHA
COMPOSER_ALLOW_SUPERUSER: 1

steps:
- name: Checkout
uses: actions/checkout@v3.5.2
uses: actions/checkout@v6.0.2

# Build the docker image and create link to vendor/ dependencies
- name: Build the Docker image
Expand All @@ -25,49 +28,72 @@ jobs:
fail-fast: true

#
# Finally, run the tests; note that this is almost all replicated in build.sh; here logging is reduced (TODO sync)
# Run tests -- these step definitions are NEARLY identical across:
# help.keyman.com, keyman.com, keymanweb.com, api.keyman.com
#
# No differences on this site
#
- name: PHP unit tests
- name: Test setup
shell: bash
run: |
docker exec web-keyman-com-app sh -c "vendor/bin/phpunit --testdox"
source ./_common/tests.inc.sh
set -e
do_test_record_start_time
echo "TEST_START_TIME=${TEST_START_TIME}" >> "$GITHUB_ENV"

- name: PHP test
if: ${{ !cancelled() }}
shell: bash
run: |
source ./_common/tests.inc.sh
set -e
do_test_unit_tests "$CONTAINER_DESC"

- name: Lint
if: ${{ !cancelled() }}
shell: bash
run: |
( set +e; set +o pipefail; find . -name '*.php' | grep -v '/vendor/' | xargs -n 1 -d '\n' php -l | grep -v "No syntax errors detected"; exit ${PIPESTATUS[2]} )
source ./_common/tests.inc.sh
set -e
do_test_lint "$CONTAINER_DESC"

- name: Check broken links
if: ${{ !cancelled() }}
shell: bash
run: |
source ./_common/tests.inc.sh
set -e
do_test_links "http://localhost:${CONTAINER_PORT}" /

# We split the reporting of broken links into a separate step for ease of
# viewing because the broken links are otherwise hidden in a sea of good
# links in a very long report

- name: Report on broken links
if: ${{ !cancelled() }}
shell: bash
run: |
set +e;
set +o pipefail;
npx broken-link-checker http://localhost:8057 --ordered --recursive --requests 50 --host-requests 50 -e --filter-level 3 | \
grep -E "BROKEN|Getting links from" | \
grep -B 1 "BROKEN"
exit ${PIPESTATUS[0]}
source ./_common/tests.inc.sh
set -e
do_test_print_link_report

- name: Check PHP errors
if: ${{ !cancelled() }}
shell: bash
run: |
CONTAINER=`docker container ls -l -q`
if docker container logs $CONTAINER 2>&1 | grep -q 'php7'; then
echo 'PHP reported errors or warnings:'
docker container logs $CONTAINER 2>&1 | grep 'php7'
exit 1
else
echo 'No PHP errors found'
exit 0
fi
#
# If any of the tests fail, let's grab a bit more detail on the environment
#
- name: Report errors
if: ${{ failure() }}
source ./_common/tests.inc.sh
set -e
do_test_print_container_error_logs "$CONTAINER_DESC"

- name: Verify .bootstrap-required-version
if: ${{ !cancelled() }}
shell: bash
run: |
CONTAINER=`docker container ls -l -q`
echo "--- tier.txt ---"
cat tier.txt
echo "--- PHP errors in Docker log ---"
docker container logs $CONTAINER 2>&1 | grep 'php7'
# We want to avoid merging a bootstrap version that is not based on a published tag
# in the shared-sites repo. We will do this with a heuristic based on the normal
# shape of the tags, which is `v#.#.#`. Any other shape we will assume is a test
# branch.
cat resources/.bootstrap-required-version | grep -qP '^v\d+\.\d+\.\d+$' || (
echo "::error file=resources/.bootstrap-required-version,line=1,col=1::This branch cannot be merged, because resources/.bootstrap-required-version references \`$(cat resources/.bootstrap-required-version)\`, which does not appear to be a published tag -- is it a test branch?"
exit 1
)
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- name: Update labels based on PR title
id: labeler
uses: fuxingloh/multi-labeler@f5bd7323b53b0833c1e4ed8d7b797ae995ef75b4 # v2.0.1
uses: fuxingloh/multi-labeler@bcd50af464202999e57f556b4aefcf05a34abf85 # v5.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
config-path: .github/multi-labeler.yml
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ cdn/deploy
/vendor
.data/

# unit test artifacts
linkinator-results.json
.phpunit.result.cache

# Shared files are bootstrapped:
resources/bootstrap.inc.sh
resources/.bootstrap-version
Expand Down
39 changes: 11 additions & 28 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
## START STANDARD SITE BUILD SCRIPT INCLUDE
readonly THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
readonly BOOTSTRAP="$(dirname "$THIS_SCRIPT")/resources/bootstrap.inc.sh"
readonly BOOTSTRAP_VERSION=v1.08
[ -f "$BOOTSTRAP" ] && source "$BOOTSTRAP" || source <(curl -H "Cache-Control: no-cache" -fs https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh)
BOOTSTRAP_VERSION="$(cat "$(dirname "THIS_SCRIPT")/resources/.bootstrap-required-version")" || exit 1
readonly BOOTSTRAP_VERSION
if ! [ -f "$BOOTSTRAP" ] || ! source "$BOOTSTRAP"; then
curl -H "Cache-Control: no-cache" --fail --silent --show-error -w "curl: Finished attempt to download %{url}" "https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/bootstrap.inc.sh" -o "$BOOTSTRAP.tmp" || exit 1
source "$BOOTSTRAP.tmp"
rm -f "$BOOTSTRAP.tmp"
fi
## END STANDARD SITE BUILD SCRIPT INCLUDE

# TODO: these should probably all be moved to a common defines script too?
Expand All @@ -25,38 +30,16 @@ builder_describe \
start \
stop \
test \
"--no-unit-test" \
"--no-lint" \
"--no-link-check"

builder_parse "$@"

function test_docker_container() {
# Note: ci.yml replicates these
echo "TIER_TEST" > tier.txt

# Run unit tests
docker exec $KEYMANWEB_CONTAINER_DESC sh -c "vendor/bin/phpunit --testdox"

# Lint .php files for obvious errors
docker exec $KEYMANWEB_CONTAINER_DESC sh -c "find . -name '*.php' | grep -v '/vendor/' | xargs -n 1 -d '\\n' php -l"

# Check all internal links
# NOTE: link checker runs on host rather than in docker image
npx broken-link-checker http://localhost:${PORT_KEYMANWEB_COM} --ordered --recursive --host-requests 10 -e --filter-level 3

# Check for errors
if docker container logs $KEYMANWEB_CONTAINER_DESC 2>&1 | grep -q 'php7'; then
echo 'PHP reported errors or warnings:'
docker container logs $KEYMANWEB_CONTAINER_DESC 2>&1 | grep 'php7'
exit 1
else
echo 'No PHP errors found'
exit 0
fi
}

builder_run_action configure bootstrap_configure
builder_run_action clean clean_docker_container $KEYMANWEB_IMAGE_NAME $KEYMANWEB_CONTAINER_NAME
builder_run_action stop stop_docker_container $KEYMANWEB_IMAGE_NAME $KEYMANWEB_CONTAINER_NAME
builder_run_action build build_docker_container $KEYMANWEB_IMAGE_NAME $KEYMANWEB_CONTAINER_NAME
builder_run_action start start_docker_container $KEYMANWEB_IMAGE_NAME $KEYMANWEB_CONTAINER_NAME $KEYMANWEB_CONTAINER_DESC $HOST_KEYMANWEB_COM $PORT_KEYMANWEB_COM $BUILDER_CONFIGURATION

builder_run_action test test_docker_container
builder_run_action test test_docker_container $KEYMANWEB_CONTAINER_DESC $PORT_KEYMANWEB_COM /
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.2"
},
"config": {
"allow-plugins": false
}
}
Loading