Skip to content

Update ALKiln tests #56

Update ALKiln tests

Update ALKiln tests #56

Workflow file for this run

name: GitHub server installation
on:
push:
pull_request:
workflow_dispatch:
inputs:
tags:
required: False
description: 'Optional. Use a "tag expression" specify which tagged tests to run (https://cucumber.io/docs/cucumber/api/#tag-expressions)'
show_docker_output:
required: false
default: false
type: boolean
description: 'Show the docker logs while building the GitHub server container. It will also save the docker log artifact. This might show sensitive config information.'
jobs:
github-server-tests:
# 1: Trigger job on push or dispatch from this repository
# 2: Trigger job on pull request from a fork
if: (
github.event_name != 'pull_request'
&& ! github.event.pull_request.head.repo.fork
) || (
github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.fork
)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.x]
steps:
# Place the root directory in this branch to access
# relative paths to action files
- uses: actions/checkout@v4
- name: "ALKiln - Start the isolated temporary docassemble server on GitHub"
id: github_server
uses: suffolkLITLab/ALKiln/action_for_github_server@v5
with:
SHOW_DOCKER_OUTPUT: "${{ github.event.inputs.show_docker_output }}"
- run: echo "ALKiln finished starting the isolated GitHub docassemble server"
shell: bash
- name: "Run ALKiln tests"
if: ${{ success() }}
id: alkiln
uses: suffolkLITLab/ALKiln@v5
with:
# https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#sandbox-inputs
SERVER_URL: "${{ steps.github_server.outputs.SERVER_URL }}"
DOCASSEMBLE_DEVELOPER_API_KEY: "${{ steps.github_server.outputs.DOCASSEMBLE_DEVELOPER_API_KEY }}"
INSTALL_METHOD: "server"
# https://assemblyline.suffolklitlab.org/docs/alkiln/writing/#optional-inputs
ALKILN_TAG_EXPRESSION: "${{ env.ALKILN_TAG_EXPRESSION }}"
# ALKILN_VERSION:
# Make an issue when test fail
# See https://cli.github.com/manual/gh_issue_create for more details
- shell: bash
if: ${{ failure() }}
env:
GH_TOKEN: ${{ github.token }}
PATH_TO_REPORT_LOG_FILE: "${{ steps.alkiln.outputs.PATH_TO_REPORT_LOG_FILE }}"
PATH_TO_UNEXPECTED_RESULTS_FILE: "${{ steps.alkiln.outputs.PATH_TO_UNEXPECTED_RESULTS_FILE }}"
PATH_TO_DEBUG_LOG_FILE: "${{ steps.alkiln.outputs.PATH_TO_DEBUG_LOG_FILE }}"
run: |
# Make an issue with file contents or 'no file' message as part of the body
if [ -f "${{ env.PATH_TO_UNEXPECTED_RESULTS_FILE }}" ]; then
UNEXPECTED_2=$(cat "${{ env.PATH_TO_UNEXPECTED_RESULTS_FILE }}")
else
UNEXPECTED_2="unexpected_results.txt does not exist. Something other than the interview tests may have failed."
fi
gh issue create --body "An ALKiln test run failed. See the action at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}.
### Results:
$UNEXPECTED_2" --repo "$GITHUB_REPOSITORY" --label "testing" --title "ALKiln tests failed"