chore #1
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 - Testcontainers | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test-without-docker: | |
| name: Tests - Running Outside Container | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| cache-dependency-path: './src/16-docker-outside-of-docker/package.json' | |
| - name: Install dependencies | |
| working-directory: ./src/16-docker-outside-of-docker | |
| run: npm install | |
| - name: Run tests - Container reuse without compose (outside container) | |
| working-directory: ./src/16-docker-outside-of-docker | |
| env: | |
| TESTCONTAINERS_RYUK_DISABLED: true | |
| run: npm run test:without-compose | |
| - name: Run tests - Container reuse with compose (outside container) | |
| working-directory: ./src/16-docker-outside-of-docker | |
| env: | |
| TESTCONTAINERS_RYUK_DISABLED: true | |
| run: npm run test:with-compose | |
| # test-inside-docker: | |
| # name: Tests - Running Inside Container (Docker-in-Docker) | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # - name: Set up Docker Buildx | |
| # uses: docker/setup-buildx-action@v3 | |
| # - name: Start test container with docker compose | |
| # working-directory: ./src/16-docker-outside-of-docker | |
| # run: docker compose up -d | |
| # - name: Install dependencies inside container | |
| # working-directory: ./src/16-docker-outside-of-docker | |
| # run: docker compose exec -T tests npm install | |
| # - name: Run tests - Container reuse without compose (inside container) | |
| # working-directory: ./src/16-docker-outside-of-docker | |
| # run: | | |
| # docker compose exec -T \ | |
| # -e TESTCONTAINERS_RYUK_DISABLED=true \ | |
| # tests npm run test:without-compose | |
| # - name: Run tests - Container reuse with compose (inside container) | |
| # working-directory: ./src/16-docker-outside-of-docker | |
| # run: | | |
| # docker compose exec -T \ | |
| # -e TESTCONTAINERS_RYUK_DISABLED=true \ | |
| # tests npm run test:with-compose | |