feat: updated schema #161
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_request | |
| on: [pull_request, workflow_dispatch] | |
| jobs: | |
| eslint: | |
| name: Run eslint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20.x, 22.x] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linters | |
| uses: wearerequired/lint-action@v2 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| # Enable linters | |
| eslint: true | |
| prettier: true | |
| eslint_extensions: ts | |
| integration-test: | |
| name: Run Integration Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20, 22] | |
| container: | |
| image: node:${{ matrix.node }} | |
| services: | |
| # Label used to access the service container | |
| elasticsearch: | |
| # Docker Hub image | |
| image: elasticsearch:8.13.0 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: false | |
| xpack.security.enrollment.enabled: false | |
| ES_JAVA_OPTS: '-Xms512m -Xmx512m' | |
| ports: | |
| - 9200:9200 | |
| # Set health checks to wait until elastic has started | |
| options: >- | |
| --health-cmd "curl -f http://localhost:9200/_cluster/health || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| minio: | |
| # Docker Hub image | |
| image: minio/minio:edge-cicd | |
| env: | |
| MINIO_ROOT_USER: minio | |
| MINIO_ROOT_PASSWORD: minio123 | |
| ports: | |
| - 9000:9000 | |
| # Set health checks to wait until elastic has started | |
| options: >- | |
| --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install Node.js dependencies | |
| run: npm ci | |
| - name: Wait for Elasticsearch | |
| run: | | |
| until curl -s http://elasticsearch:9200/_cluster/health | grep '"status":"green"'; do | |
| echo "Waiting for Elasticsearch..."; | |
| sleep 5; | |
| done | |
| - name: Run integration tests | |
| run: npm run test:integration | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Integration Test Reporters (Node ${{ matrix.node }}) | |
| path: reports/** | |
| unit-test: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20, 22] | |
| container: | |
| image: node:${{ matrix.node }} | |
| services: | |
| # Label used to access the service container | |
| elasticsearch: | |
| # Docker Hub image | |
| image: elasticsearch:8.13.0 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: false | |
| xpack.security.enrollment.enabled: false | |
| ES_JAVA_OPTS: '-Xms512m -Xmx512m' | |
| ports: | |
| - 9200:9200 | |
| # Set health checks to wait until elastic has started | |
| options: >- | |
| --health-cmd "curl -f http://localhost:9200/_cluster/health || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| minio: | |
| # Docker Hub image | |
| image: minio/minio:edge-cicd | |
| env: | |
| MINIO_ROOT_USER: minio | |
| MINIO_ROOT_PASSWORD: minio123 | |
| ports: | |
| - 9000:9000 | |
| # Set health checks to wait until elastic has started | |
| options: >- | |
| --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install Node.js dependencies | |
| run: npm ci | |
| - name: Wait for Elasticsearch | |
| run: | | |
| until curl -s http://elasticsearch:9200/_cluster/health | grep '"status":"green"'; do | |
| echo "Waiting for Elasticsearch..."; | |
| sleep 5; | |
| done | |
| - name: Run unit tests | |
| run: npm run test:unit | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Unit Test Reporters (Node ${{ matrix.node }}) | |
| path: reports/** | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Run Snyk to check for vulnerabilities | |
| uses: snyk/actions/node@master | |
| continue-on-error: true | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
| build_image: | |
| name: Build Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: build Docker image | |
| run: docker build -t test-build:latest . |