Fix DB mixin code #83
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: Test with Kubernetes | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '10 10 * * 3' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # transporter: [NATS, Redis, MQTT, AMQP, AMQP10, Kafka] | |
| transporter: [None, NATS, Redis, MQTT, AMQP, Kafka] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js with ${{ matrix.transporter }} transporter | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - name: Install dependencies | |
| run: npm i | |
| - name: Create answers file | |
| run: node update-answers.js | |
| working-directory: ./test/ci | |
| env: | |
| TRANSPORTER: ${{ matrix.transporter }} | |
| - name: Generate project with '${{ matrix.transporter }}' transporter | |
| run: npm test | |
| - name: Build Docker image | |
| run: docker build -t ci-test . | |
| working-directory: ./ci-test | |
| - uses: engineerd/[email protected] | |
| with: | |
| version: "v0.29.0" | |
| config: ./test/ci/kind-config.yaml | |
| - run: kubectl cluster-info | |
| - run: kubectl get nodes | |
| - run: kubectl get pods --all-namespaces | |
| - name: Load built image | |
| run: kind load docker-image ci-test | |
| - name: Install NGINX Ingress | |
| run: | | |
| kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml | |
| kubectl wait --namespace ingress-nginx \ | |
| --for=condition=ready pod \ | |
| --selector=app.kubernetes.io/component=controller \ | |
| --timeout=90s | |
| - run: cat ./ci-test/k8s.yaml | |
| - name: Kubectl apply | |
| working-directory: ./ci-test | |
| run: kubectl apply -f k8s.yaml | |
| - name: Wait for deployment | |
| run: "kubectl rollout status deployment ${{ matrix.transporter != 'None' && 'greeter' || 'services' }} --timeout=180s" | |
| - name: Sleeping 90 secs (for Redis, Mongo...etc) | |
| run: sleep 90 | |
| - name: Check pods | |
| run: | | |
| kubectl get all | |
| - name: Check greeter.hello via API | |
| run: curl --silent --show-error --fail http://ci-test.127.0.0.1.nip.io/api/greeter/hello | |
| - name: Check products.list via API | |
| run: curl --silent --show-error --fail http://ci-test.127.0.0.1.nip.io/api/products | |
| if: ${{ matrix.transporter != 'None' }} | |
| - name: Check greeter.hello via GraphQL | |
| run: | | |
| curl --silent --show-error --fail -H "Content-Type: application/json" --data '{"query": "query { hello } "}' http://ci-test.127.0.0.1.nip.io/graphql | |
| if: ${{ matrix.transporter != 'None' }} | |
| - name: Check Pod | |
| run: kubectl describe pod ${{ matrix.transporter != 'None' && 'greeter' || 'services' }} | |
| if: failure() | |
| - name: Check logs | |
| run: kubectl logs deployment/${{ matrix.transporter != 'None' && 'greeter' || 'services' }} | |
| if: failure() |