Bump basic-ftp from 5.2.0 to 5.2.2 in /eform-client #9311
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: Pull requests | |
| on: | |
| pull_request: | |
| branches: [ master, stable, angular19 ] | |
| paths-ignore: | |
| - '*.md' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build Docker image | |
| id: build | |
| run: docker build . -t microtingas/frontend-container:latest --build-arg GITVERSION=1.0.0 --build-arg SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}} --build-arg DISABLE_SENTRY=true | |
| shell: bash | |
| - run: docker save microtingas/frontend-container:latest -o container.tar | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: container | |
| path: container.tar | |
| playwright-test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test: [a,b,c,d,e,f,g,h,i,j] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: container | |
| - run: docker load -i container.tar | |
| - name: Create docker network | |
| run: docker network create --driver bridge --attachable data | |
| - name: Start MariaDB | |
| run: | | |
| docker pull mariadb:10.8 | |
| docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8 | |
| - name: Start rabbitmq | |
| run: | | |
| docker pull rabbitmq:latest | |
| docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest | |
| - name: Use Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: yarn install | |
| run: cd eform-client && yarn install | |
| - name: Install Playwright browsers | |
| run: cd eform-client && npx playwright install --with-deps chromium | |
| - name: Create errorShots directory | |
| run: mkdir eform-client/errorShots | |
| - name: Wait for MariaDB | |
| run: | | |
| for i in {1..30}; do | |
| if docker exec mariadb-test mysql -uroot -psecretpassword -e "SELECT 1" &>/dev/null; then | |
| echo "MariaDB is ready!" | |
| break | |
| fi | |
| echo "Waiting for MariaDB... ($i/30)" | |
| sleep 2 | |
| done | |
| - name: Start the newly build Docker container | |
| id: docker-run | |
| run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 & | |
| - name: Sleep 15 seconds | |
| run: sleep 15 | |
| - name: Get standard output | |
| run: cat docker_run_log | |
| - name: Pretest changes to work with Docker container | |
| run: sed -i 's/localhost/mariadbtest/g' eform-client/playwright/e2e/Constants/DatabaseConfigurationConstants.ts | |
| - name: DB Configuration | |
| run: cd eform-client && npx playwright test playwright/e2e/Tests/database-configuration/ | |
| - name: Playwright ${{matrix.test}} test | |
| run: cd eform-client && npx playwright test playwright/e2e/Tests/${{matrix.test}}/ | |
| - name: Stop the newly build Docker container | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| run: docker stop my-container | |
| - name: Verify startup log | |
| if: ${{ always() }} | |
| run: | | |
| cat docker_run_log | |
| result=`cat docker_run_log | grep "Now listening on:.*:5000" -m 1 | wc -l` | |
| if [ $result -ne 1 ];then exit 1; fi | |
| - name: Stop mariadb | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| run: docker stop mariadbtest | |
| - name: Stop rabbitmq | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| run: docker stop some-rabbit | |
| - name: Remove old network | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| run: docker network rm data | |
| - name: cleanup | |
| if: ${{ always() }} | |
| run: docker container prune --force | |
| - name: Archive Playwright report | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-${{matrix.test}} | |
| path: | | |
| eform-client/playwright-report/ | |
| retention-days: 2 | |
| - name: Archive Playwright videos | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-videos-${{matrix.test}} | |
| path: | | |
| eform-client/test-results/ | |
| retention-days: 2 | |
| test-angular-unit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: cd eform-client && yarn install --frozen-lockfile | |
| - name: Run Jest unit tests | |
| run: cd eform-client && npm run test:unit | |
| test-dotnet: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Create docker network | |
| run: docker network create --driver bridge --attachable data | |
| - name: Start MariaDB | |
| run: | | |
| docker pull mariadb:latest | |
| docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest | |
| - name: Start rabbitmq | |
| run: | | |
| docker pull rabbitmq:latest | |
| docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install dependencies | |
| run: dotnet restore eFormAPI/eFormAPI.sln | |
| - name: Build | |
| run: dotnet build eFormAPI/eFormAPI.sln | |
| - name: Unit Tests | |
| run: dotnet test --no-restore -c Release -v n eFormAPI/eFormAPI.Web.Tests/eFormAPI.Web.Tests.csproj | |
| - name: Integration Tests | |
| run: dotnet test --no-restore -c Release -v n eFormAPI/eFormAPI.Web.Integration.Tests/eFormAPI.Web.Integration.Tests.csproj |