test: docker compose e2e #9
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: End 2 End Tests | |
on: | |
push: | |
branches: | |
- test/e2e | |
jobs: | |
e2e-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: sudo apt install -y openssl | |
- run: openssl req -newkey rsa:2048 -nodes -keyout server.key -out server.csr -subj "/CN=localhost" | |
- run: openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
- run: openssl pkcs12 -export -out server.p12 -inkey server.key -in server.crt -passout pass:${{ secrets.E2E_SSL_PASSWORD }} | |
- run: sudo mkdir /certs | |
- run: sudo mv server.p12 /certs/keystore.p12 | |
- run: docker compose -f ./webapp/e2e/docker-compose.yml up -d --pull always | |
- run: npm --prefix webapp install | |
- run: npm --prefix webapp run build | |
- run: npm --prefix webapp run test:e2e |