Skip to content

Commit

Permalink
feat: readded e2e to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed May 5, 2024
1 parent 11f7956 commit 1236fa0
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,30 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
e2e-tests:
needs: [ unit-tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: docker compose --profile e2e up -d --pull always
- 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 }} -name tomcat
- run: sudo mkdir /certs
- run: sudo mv server.p12 /certs/keystore.p12
- name: Set up environment variables
run: |
echo "DATABASE_USER=${{ secrets.DATABASE_USER }}" >> .env
echo "DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }}" >> .env
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" >> .env
echo "REACT_APP_API_ENDPOINT=https://localhost:8443" >> ./webapp/.env
echo "SSL_PASSWORD=${{ secrets.E2E_SSL_PASSWORD }}" >> .env
- run: mv .env ./webapp/e2e/.env
- run: docker compose -f ./webapp/e2e/docker-compose.yml up -d
- run: npm --prefix webapp install
- run: npm --prefix webapp run build
- run: npm --prefix webapp run test:e2e
- run: npm --prefix webapp run test:e2eci
docker-push-api:
runs-on: ubuntu-latest
needs: [ unit-tests ]
Expand Down

0 comments on commit 1236fa0

Please sign in to comment.