Skip to content

Commit

Permalink
Attempt to install package and test only two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
plocket committed Aug 14, 2023
1 parent c50d51a commit 4b4355b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/github_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
tags:
required: False
description: 'Optional. Use a "tag expression" specify which tagged tests to run (https://cucumber.io/docs/cucumber/api/#tag-expressions)'
default: ''
# Only test 2 tests - one uses an env var, the other uses AL.
# They test if env vars get set correctly and depencencies get
# pulled in correctly.
default: '@e6 or @al1'

jobs:

Expand All @@ -26,8 +29,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Use ALKiln to run tests
- name: Run ALKiln on the GitHub server
uses: SuffolkLITLab/ALKiln/github_server@start_server_take_2
with:
CONFIG_CONTENTS: "${{ secrets.CONFIG_CONTENTS }}"
- run: echo "Finished running ALKiln tests"
- run: echo "Finished running on the GitHub server"
13 changes: 8 additions & 5 deletions github_server/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "ALKiln/github_server: Isolated docassemble tests"
description: "Automatically test docassemble interviews on GitHub's servers, in an isolated environment. Avoids docassemble reload errors and other external factors"
description: "Automatically test docassemble interviews on GitHub's servers, in an isolated environment. Avoids docassemble reload errors and other external factors."


inputs:
Expand Down Expand Up @@ -30,17 +30,20 @@ runs:
run: |
echo "DA_ADMIN_API_KEY=abcd1234abcd1234abcd5678abdc5678" >> $GITHUB_ENV
shell: bash
- name: Download and start docker
- name: "github_server: Download and start docker"
run: |
mkdir /tmp/config
echo "$CONFIG_CONTENTS" > /tmp/config/myconfig.yml
docker pull brycewilley/smoldocassemble
docker run --env DA_ADMIN_EMAIL="[email protected]" --env DA_ADMIN_PASSWORD="password" --env DA_ADMIN_API_KEY="${{ env.DA_ADMIN_API_KEY }}" --env DA_CONFIG=/tmp/config/myconfig.yml --volume /tmp/config:/tmp/config --cap-add SYS_PTRACE --memory="4gb" -d -p 80:80 jhpyle/docassemble
# TODO before merge: do a while loop here until `localhost` shows "It's ready"
sleep 480
sleep 600
curl localhost
shell: bash
- name: Run Kiln
- name: "github_server: Install the package"
run: alkiln-startserver
shell: bash
- name: "github_server: Run Kiln"
# TODO: Research how to get this to always be the same branch we're on
uses: SuffolkLITLab/ALKiln@v5
with:
Expand All @@ -50,4 +53,4 @@ runs:
# TODO: create an arifact for this instead
run: |
docker logs $(docker ps --filter "ancestor=jhpyle/docassemble" --format {{.ID}})
shell: bash
shell: bash

0 comments on commit 4b4355b

Please sign in to comment.