Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): add docker run localy to start the backend at the same place #1522

Merged
merged 22 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,27 @@ jobs:
- run: sudo apt-get install libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- name: Checkout
uses: actions/checkout@v1
- name: Login to Docker Github
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Spring profile
run: echo $'SPRING_PROFILES_ACTIVE=local,jwt,demo\nSPRING_DATASOURCE_URL=jdbc:h2:~/ebad;MODE=PostgreSQL;MODE=PostgreSQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE' > springprofil.env
- name: Cypress run
uses: cypress-io/github-action@v4
with:
start: npm run start:coverage
wait-on: 'http://localhost:4200, https://ebad-demo.homefaya.fr/ebad/actuator/health'
start: |
npm run start:coverage
docker run -p 11006:11006 --env-file springprofil.env ghcr.io/informatique-cdc/ebad/ebad:2.11.0
wait-on: 'http://localhost:11006/ebad/actuator/health, http://[::1]:4200'
# wait-on: 'npx wait-on --timeout 60000 http://localhost:4200'
wait-on-timeout: 180
browser: chrome
command-prefix: npx
install-command: npm ci --legacy-peer-deps
auto-cancel-after-failures: 1
- uses: actions/upload-artifact@v2
if: failure()
with:
Expand Down
6 changes: 3 additions & 3 deletions cypress/fixtures/login.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"admin": {
"login": "admin",
"login": "demo",
"password": "password",
"firstname": "admin",
"lastname": "admin"
"firstname": "demo",
"lastname": "demo"
}
}
2 changes: 1 addition & 1 deletion proxy-cov.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"/ebad":
{
"target": "https://ebad-demo.homefaya.fr",
"target": "http://127.0.0.1:11006",
"secure": false,
"changeOrigin": true
}
Expand Down
2 changes: 1 addition & 1 deletion proxy.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"/ebad":
{
"target": "https://ebad-demo.homefaya.fr",
"target": "http://localhost:11006",
"secure": false,
"changeOrigin": true
}
Expand Down