tests: Build and run examples as end to end tests #80
Workflow file for this run
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: PR | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| endtoend-tests: | |
| name: End to end tests | |
| runs-on: ubuntu-latest | |
| services: | |
| registry: | |
| image: registry:2 | |
| ports: | |
| - 5000:5000 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Mark the workspace as safe | |
| # https://github.com/actions/checkout/issues/766 | |
| run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
| - name: Test the registry | |
| run: | | |
| curl -v localhost:5000/v2/ | |
| - name: Push somethingtry | |
| run: | | |
| swift run containertool --repository localhost:5000/vapor Package.swift | |
| - name: Run the example | |
| run: | | |
| docker run -d -p 8080:8080 localhost:5000/vapor | |
| - name: Check that the service is running | |
| run: | | |
| curl localhost:8080 |