bitcoin-tools / bitcoin-tools/nodebuilder
Add console output testing for Dockerfiles
- Dominant language
- Shell
- Stars
- 7
- Forks
- 0
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 28
Description
```
jobs:
run-nodebuilder-docker:
name: Run in ${{ matrix.container }} container
runs-on: ubuntu-latest
strategy:
matrix:
container: [Alpine, Fedora, Manjaro, Ubuntu]
include:
- container: Alpine
dockerfile: ./dockerfiles/Dockerfile_alpine
- container: Arch
dockerfile: ./dockerfiles/Dockerfile_arch
- container: Debian
dockerfile: ./dockerfiles/Dockerfile_debian
- container: Fedora
dockerfile: ./dockerfiles/Dockerfile_fedora
- container: Manjaro
dockerfile: ./dockerfiles/Dockerfile_manjaro
- container: Ubuntu
dockerfile: ./Dockerfile
- container: openSUSE
dockerfile: ./dockerfiles/Dockerfile_opensuse
needs: [bash-lint, yaml-lint, dockerfile-lint, markdown-links, markdown-spellcheck]
steps:
- name: Check the current OS version
run: grep "VERSION\|ID" /etc/os-release && uname -a
- uses: actions/checkout@v4
- name: Build the docker image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: false
tags: my${{ matrix.container }}image:latest
- name: Run the docker image and capture output
run: docker run my${{ matrix.container }}image:latest \
> stdout_${{ matrix.container }}.txt \
2> stderr_${{ matrix.container }}.txt
- name: Run test script on stdout
run: ./test/test_dockerfile stdout_${{ matrix.container }}.txt
- name: Upload stdout and stderr as artifacts
uses: actions/upload-artifact@v2
with:
name: output-${{ matrix.container }}
path: |
stdout_${{ matrix.container }}.txt
stderr_${{ matrix.container }}.txt
```
Contributor guide
Assessment
This issue has not been assessed yet.