Skip to content

Commit

Permalink
force HOME directory to point at /root
Browse files Browse the repository at this point in the history
- GitHub Actions overrides HOME for unclear reasons, which breaks container expectations,
actions/runner#863
  • Loading branch information
ThrawnCA committed Sep 27, 2024
1 parent 132d155 commit 568f2ef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ commands:

logs:
usage: Show Docker logs.
cmd: sh bin/docker-compose.sh logs "$@"
cmd: |
ahoy title "Output logs"
sh bin/docker-compose.sh logs "$@"
pull:
usage: Pull latest docker images.
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
PROJECT="ckanext-qgov"

# Docker Compose project name. All containers will have this name.
COMPOSE_PROJECT_NAME="$PROJECT"
COMPOSE_PROJECT_NAME="ckanext-qgov"

# Flag to allow code linting failures. 0=enforce, 1=ignore
ALLOW_LINT_FAIL=0
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ on:
- master

jobs:
# Quick check so we don't waste minutes if there's a Flake8 error
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install requirements
Expand All @@ -23,20 +24,24 @@ jobs:
test:
needs: lint
strategy:
fail-fast: false
fail-fast: true
matrix:
ckan-version: ["2.10"]
ckan-type: ['vanilla', 'custom']

name: CKAN ${{ matrix.ckan-version }} ${{ matrix.ckan-type }}
runs-on: ubuntu-latest
container: drevops/ci-builder:23.7.0
container: drevops/ci-runner:23.12.0
env:
CKAN_VERSION: ${{ matrix.ckan-version }}
CKAN_TYPE: ${{ matrix.ckan-type }}

steps:
- uses: actions/checkout@v3
# Patch https://github.com/actions/runner/issues/863
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"

- uses: actions/checkout@v4
timeout-minutes: 2

- name: Build
Expand All @@ -58,12 +63,12 @@ jobs:
timeout-minutes: 30

- name: Retrieve logs
if: failure()
if: always()
run: ahoy logs
timeout-minutes: 5
timeout-minutes: 1

- name: Retrieve screenshots
if: failure()
if: always()
run: bin/process-artifacts.sh
timeout-minutes: 1

Expand Down

0 comments on commit 568f2ef

Please sign in to comment.