update: add product images to image-assets.js #26
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: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run JavaScript linting | |
| run: npm run lint | |
| - name: Run CSS linting | |
| run: npm run lint:css | |
| - name: Run tests | |
| run: npm run test | |
| - name: Build application | |
| run: npm run build | |
| docker: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t html-yuql . | |
| - name: Test Docker image | |
| run: | | |
| docker run -d --name test-container -p 3000:3000 html-yuql | |
| sleep 10 | |
| curl -f http://localhost:3000 || exit 1 | |
| docker stop test-container | |
| docker rm test-container | |
| sleep 10 | |
| curl -f http://localhost:3000/health || exit 1 | |
| docker stop test-container | |
| docker rm test-container |