mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 20:44:32 -05:00
Add test that docker images are working (#4952)
* use build directory in dockerfiles * add release notes * add test * Add test for cli, try to fix image test * - fail * try again * try again to fail * done testing * Code review * publish is unecessary
This commit is contained in:
10
.github/workflows/check.yml
vendored
10
.github/workflows/check.yml
vendored
@@ -27,6 +27,16 @@ jobs:
|
||||
uses: ./.github/actions/setup
|
||||
- name: Typecheck
|
||||
run: yarn typecheck
|
||||
validate-cli:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up environment
|
||||
uses: ./.github/actions/setup
|
||||
- name: Build Web
|
||||
run: yarn build:server
|
||||
- name: Check that the built CLI works
|
||||
run: node packages/sync-server/build/bin/actual-server.js --version
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
21
.github/workflows/docker-edge.yml
vendored
21
.github/workflows/docker-edge.yml
vendored
@@ -80,7 +80,24 @@ jobs:
|
||||
- name: Build Web
|
||||
run: yarn build:server
|
||||
|
||||
- name: Build and push image
|
||||
- name: Build image for testing
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
file: packages/sync-server/docker/${{ matrix.os }}.Dockerfile
|
||||
tags: actual-test=${{ matrix.os }}
|
||||
build-args: |
|
||||
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Test that the docker image boots
|
||||
run: |
|
||||
docker run --detach --network=host actual-test-${{ matrix.os }}
|
||||
sleep 5
|
||||
curl --fail -sS -LI -w '%{http_code}\n' --retry 10 --retry-delay 1 --retry-connrefused localhost:5006
|
||||
|
||||
# This will use the cache from the earlier build step and not rebuild the image
|
||||
# https://docs.docker.com/build/ci/github-actions/test-before-push/
|
||||
- name: Build and push images
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
@@ -90,3 +107,5 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
build-args: |
|
||||
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
|
||||
6
upcoming-release-notes/4952.md
Normal file
6
upcoming-release-notes/4952.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Maintenance
|
||||
authors: [rgoldfinger]
|
||||
---
|
||||
|
||||
Add tests for the docker image build and the sync-server cli.
|
||||
Reference in New Issue
Block a user