diff options
author | 2023-08-30 14:18:12 +0100 | |
---|---|---|
committer | 2023-08-30 14:18:12 +0100 | |
commit | 818307f294f7efe1d2585daffe52b3ad6bde5062 (patch) | |
tree | 4f2ede702166f39f85102d3885f6720883704b3b /.github | |
parent | Merge pull request #113 from python-discord/jb3/shared-mem (diff) |
Test deployment init container in CI
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/test.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index acbfd1f..473b8a7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -93,3 +93,31 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./coverage.lcov + + dry-run-deploy: + name: Dry run deployment.yaml init container + runs-on: ubuntu-latest + needs: test + steps: + - name: Download image artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.artifact }} + + - name: Load image from archive + run: docker load -i ${{ inputs.artifact }}.tar + + # Needed for the Docker Compose file. + - name: Checkout code + uses: actions/checkout@v3 + + # Install eval deps the same way as init container from deployment.yaml + # This is to ensure that deployment won't fail at that step + - name: Install eval deps + run: | + export IMAGE_SUFFIX='-venv:${{ inputs.version }}' + export PYTHONUSERBASE=/snekbox/user_base + docker compose run \ + --rm -T --entrypoint /bin/sh snekbox -c \ + find /lang/python -mindepth 1 -maxdepth 1 -type d -exec \ + {}/bin/python -m pip install --user -U -r requirements/eval-deps.pip \; |