build container needs to write to packages #31
This file contains hidden or 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 container build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-22.04 | |
| name: Docker Test | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: docker build | |
| run: docker build . -t metacpan/metacpan-base:test | |
| - name: docker run | |
| run: docker run --mount type=bind,src="$(pwd)/test-app.psgi",dst=/app/app.psgi -w /app -p 8000:8000 -d --rm --name test metacpan/metacpan-base:test /uwsgi.sh --http-socket :8000 | |
| - run: sleep 1 | |
| - name: test output of uwsgi service | |
| run: curl -sf 'http://localhost:8000/' | |
| - run: docker container stop test |