Merge pull request #21 from redmica/redmica3.0.0 #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: build_test | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
target: ['3.0.0', '3.0.0/alpine'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: docker/build-push-action@v4 | |
with: | |
context: ./${{ matrix.target }} | |
tags: redmica | |
push: false | |
- name: Build image | |
run: | | |
docker run -d --name=test-redmica-container -p 3000:3000 redmica | |
- name: Wait for starting | |
run: sleep 30 | |
- name: Test | |
run: | | |
if [[ "`echo ${{ matrix.target }} | grep alpine`" ]]; then | |
docker exec --tty test-redmica-container bash -c "apk update;apk add curl;curl localhost:3000 | grep redmine" | |
else | |
docker exec --tty test-redmica-container bash -c "apt-get update;apt-get install -y curl;curl localhost:3000 | grep redmine" | |
fi |