Merge pull request #1094 from smalruby/feature/admin #306
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 - Infra | |
| on: | |
| pull_request: | |
| paths: | |
| - 'infra/**' | |
| push: | |
| branches: [main, master, develop, hotfix/*] | |
| paths: | |
| - 'infra/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: "${{ github.workflow }} @ ${{ github.head_ref || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # smalruby-mesh-v2 | |
| # --------------------------------------------------------------------------- | |
| ruby-unit-tests: | |
| name: "[mesh-v2] Ruby Unit Tests & Lint" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-mesh-v2 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version-file: infra/smalruby-mesh-v2/.ruby-version | |
| bundler-cache: true | |
| working-directory: infra/smalruby-mesh-v2 | |
| - name: Run unit tests | |
| run: bundle exec rspec spec/unit/ | |
| - name: Run StandardRB linter | |
| run: bundle exec standardrb | |
| cdk-build: | |
| name: "[mesh-v2] CDK Build & Synth" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-mesh-v2 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-mesh-v2/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-mesh-v2/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: Synthesize CDK stack | |
| env: | |
| APPSYNC_CUSTOM_DOMAIN: 'false' | |
| run: npx cdk synth --context stage=stg | |
| security: | |
| name: "[mesh-v2] Security Audits" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-mesh-v2 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-mesh-v2/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-mesh-v2/package-lock.json | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version-file: infra/smalruby-mesh-v2/.ruby-version | |
| bundler-cache: true | |
| working-directory: infra/smalruby-mesh-v2 | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Run npm audit | |
| run: npm audit --audit-level=moderate | |
| continue-on-error: true | |
| - name: Run bundler-audit | |
| run: bundle exec bundler-audit check --update | |
| continue-on-error: true | |
| # --------------------------------------------------------------------------- | |
| # smalruby-rubytee-relay | |
| # --------------------------------------------------------------------------- | |
| rubytee-relay-unit-tests: | |
| name: "[rubytee-relay] Unit Tests" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-rubytee-relay | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-rubytee-relay/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-rubytee-relay/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm test | |
| rubytee-relay-cdk-build: | |
| name: "[rubytee-relay] CDK Build & Synth" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-rubytee-relay | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-rubytee-relay/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-rubytee-relay/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: Synthesize CDK stack | |
| env: | |
| ANTHROPIC_API_KEY: 'dummy-key-for-synth' | |
| RUBYTEE_CUSTOM_DOMAIN: 'false' | |
| run: npx cdk synth --context stage=stg | |
| rubytee-relay-security: | |
| name: "[rubytee-relay] Security Audit" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-rubytee-relay | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-rubytee-relay/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-rubytee-relay/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run npm audit | |
| run: npm audit --audit-level=moderate | |
| continue-on-error: true | |
| # --------------------------------------------------------------------------- | |
| # smalruby-api | |
| # --------------------------------------------------------------------------- | |
| smalruby-api-unit-tests: | |
| name: "[smalruby-api] Unit Tests" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-api | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-api/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-api/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm test | |
| smalruby-api-cdk-build: | |
| name: "[smalruby-api] CDK Build & Synth" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-api | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-api/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-api/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: Synthesize CDK stack | |
| env: | |
| MESH_ZONE_SECRET_KEY: 'dummy-key-for-synth' | |
| SMALRUBY_API_CUSTOM_DOMAIN: 'false' | |
| run: npx cdk synth --context stage=stg | |
| smalruby-api-security: | |
| name: "[smalruby-api] Security Audit" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-api | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-api/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-api/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run npm audit | |
| run: npm audit --audit-level=moderate | |
| continue-on-error: true | |
| # --------------------------------------------------------------------------- | |
| # smalruby-bug-report | |
| # --------------------------------------------------------------------------- | |
| smalruby-bug-report-unit-tests: | |
| name: "[bug-report] Unit Tests" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-bug-report | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-bug-report/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-bug-report/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm test | |
| smalruby-bug-report-cdk-build: | |
| name: "[bug-report] CDK Build & Synth" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-bug-report | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-bug-report/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-bug-report/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: Synthesize CDK stack | |
| env: | |
| BUG_REPORT_CUSTOM_DOMAIN: 'false' | |
| run: npx cdk synth --context stage=stg | |
| smalruby-bug-report-security: | |
| name: "[bug-report] Security Audit" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra/smalruby-bug-report | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version-file: infra/smalruby-bug-report/.node-version | |
| cache: npm | |
| cache-dependency-path: infra/smalruby-bug-report/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run npm audit | |
| run: npm audit --audit-level=moderate | |
| continue-on-error: true |