Skip to content

Commit

Permalink
Update actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PrasanthVijayy authored Oct 16, 2024
1 parent a8d153e commit 8b219b7
Showing 1 changed file with 7 additions and 37 deletions.
44 changes: 7 additions & 37 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ jobs:
build:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.DB_PASSWORD }}
MYSQL_DATABASE: ${{ secrets.DB_NAME }}
ports:
- 3306:3306
options: >
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
node-version: [20.x]
Expand All @@ -42,28 +28,12 @@ jobs:
- name: Install dependencies
run: npm install

# Wait for the MySQL service to be ready
- name: Wait for MySQL to be ready
run: |
for i in {1..30}; do
if mysqladmin ping -h "127.0.0.1" --silent; then
break
fi
sleep 1
done
- name: Run tests
env:
DB_NAME: ${{ secrets.DB_NAME }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_HOST: 127.0.0.1
DB_PORT: 3306
run: npm test
run: |
npm test -- --ci --reporters="default" --reporters="jest-silent-reporter"
continue-on-error: true

- name: Upload Jest Test Report
if: always()
uses: actions/upload-artifact@v3
with:
name: jest-test-report
path: ./coverage/
- name: Display test case summary
run: |
echo "Test Summary:"
npm test -- --ci --reporters="jest-summary-reporter"

0 comments on commit 8b219b7

Please sign in to comment.