diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba343e3a12..67fd5aac7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,40 +6,49 @@ on: schedule: - cron: '0 0 * * 0' -permissions: - contents: read - jobs: test-node: runs-on: ubuntu-latest - timeout-minutes: 10 strategy: - fail-fast: false matrix: - node-version: - - 18 - - 20 + node-version: [12, 14, 16] steps: - - name: Checkout repository - uses: actions/checkout@v4 - + - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + env: + CI: true - - name: Install dependencies - run: npm ci - - # in order to test our compliance with TypeScript v4.2 (older versions are not tested) - - name: Install TypeScript 4.2 - run: npm i typescript@4.2 - if: ${{ matrix.node-version == '16' }} + build-examples: + runs-on: ubuntu-latest + timeout-minutes: 10 - - name: Compile each package - run: npm run compile --workspaces --if-present + strategy: + fail-fast: false + matrix: + example: + - custom-parsers + - typescript + - webpack-build + - webpack-build-server - - name: Run tests - run: npm test --workspaces + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Use Node.js 20 + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Build ${{ matrix.example }} + run: | + cd examples/${{ matrix.example }} + npm install + npm run build diff --git a/examples/cluster-nginx/docker-compose.yml b/examples/cluster-nginx/docker-compose.yml index 810c3b6892..0c2b76076a 100644 --- a/examples/cluster-nginx/docker-compose.yml +++ b/examples/cluster-nginx/docker-compose.yml @@ -3,27 +3,18 @@ services: image: nginx:alpine volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - links: - - server-john - - server-paul - - server-george - - server-ringo ports: - - "3000:80" + - "3000:80" server-john: build: ./server - links: - - redis expose: - - "3000" + - "3000" environment: - NAME=John server-paul: build: ./server - links: - - redis expose: - "3000" environment: @@ -31,8 +22,6 @@ services: server-george: build: ./server - links: - - redis expose: - "3000" environment: @@ -40,8 +29,6 @@ services: server-ringo: build: ./server - links: - - redis expose: - "3000" environment: @@ -49,10 +36,8 @@ services: client: build: ./client - links: - - nginx redis: - image: redis:6 + image: redis:alpine expose: - "6379"