Skip to content

Commit

Permalink
add docker test CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Dec 7, 2021
1 parent c627b97 commit 91f7642
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# For details of what checks are run for PRs please refer below
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Docker CI

on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:

jobs:
test:
name: Build and test docker image
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOCKER_TAG: 'cdx-node-module-testing:${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}'
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v2.4.0
- name: Build Docker image
run: docker build -f Dockerfile -t "$DOCKER_TAG" .
- name: Test Docker image
run: docker run --rm "$DOCKER_TAG" -h
- name: Destroy Docker image
# run regardless of outcome
if: ${{ always() }}
run: docker rmi -f "$DOCKER_TAG"
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
CI: "true"

jobs:
build:
test:
name: Test (node${{ matrix.node-version }}, ${{ matrix.os }})
timeout-minutes: 30
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 91f7642

Please sign in to comment.