Skip to content

chore: update webda.module.json for gcp #1711

chore: update webda.module.json for gcp

chore: update webda.module.json for gcp #1711

Workflow file for this run

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
# ******** NOTE ********
name: "CI"
on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
test:
# Cannot rely on Github Azure hosted action because of GCP connection
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["18", "20"]
name: Build with NodeJS v${{ matrix.node }}
env:
FORCE_COLOR: 1
services:
localstack:
image: localstack/localstack:latest
ports:
- 4566:4566
env:
SERVICES: s3,sts,sqs,dynamodb,secretsmanager,logs
mongodb:
image: mongo
ports:
- 37017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: webda.io
amqp:
image: rabbitmq
ports:
- 5672:5672
permissions:
id-token: "write"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.2.0
security-enabled: false
- name: Setup postgresql
uses: Softwarepark/postgresql-action@v2
with:
postgresql version: "15" # See https://hub.docker.com/_/postgres for available versions
postgresql password: webda.io
postgresql user: webda.io
postgresql db: webda.io
postgresql init scripts: packages/postgres/test/sql
- id: auth
uses: google-github-actions/auth@v0.4.0
with:
create_credentials_file: true
workload_identity_provider: ${{ secrets.GCP_OIDC_ID_PROVIDER }}
service_account: ${{ secrets.GCP_OIDC_SA}}
# - name: Restore Lerna/NX Cache
# uses: actions/cache@v3
# with:
# path: node_modules/.cache
# key: ${{ runner.os }}-${{ matrix.node }}
- name: Install dependencies
run: yarn install
- name: Build
run: yarn run build
- name: Run tests
run: yarn run test --exclude @webda/aws --exclude @webda/shell --exclude @webda/gcp
env:
NODE_OPTIONS: "--max-old-space-size=6144"
- name: Run AWS tests
run: yarn run nx run @webda/aws:test
env:
NODE_OPTIONS: "--max-old-space-size=6144"
- name: Run GCP tests
run: yarn run nx run @webda/gcp:test || yarn nx run @webda/gcp:test
env:
NODE_OPTIONS: "--max-old-space-size=6144"
- name: Run shell tests
run: yarn run nx run @webda/shell:test
env:
NODE_OPTIONS: "--max-old-space-size=6144"
- name: CodeCov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}