Move project to use npm #4
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
| # DO NOT EDIT | |
| # This is a generated file by the `rake build_matrix:github_actions:generate` task. | |
| # See `build_matrix.yml` for the build matrix. | |
| # Generate this file with `rake build_matrix:github_actions:generate`. | |
| --- | |
| name: CI | |
| 'on': | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| schedule: | |
| - cron: 0 0 * * 1-5 | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: "${{ !contains(github.ref, 'main')}}" | |
| env: | |
| RUNNING_IN_CI: 'true' | |
| NODE_ENV: test | |
| jobs: | |
| validate: | |
| name: Validate CI setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Validate CI setup | |
| run: rake build_matrix:github_actions:validate | |
| lint: | |
| name: Linters | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Ruby Lint (RuboCop) | |
| run: bundle exec rubocop | |
| - name: JavaScript Lint (Prettier) | |
| node-version: '20' | |
| run: |- | |
| npm install | |
| npm run lint | |
| - name: Git Lint (Lintje) | |
| run: script/lint_git | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Setup Node.js | |
| if: matrix.node-version | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "${{ matrix.node-version }}" | |
| cache: npm | |
| - name: "${{ matrix.name }}" | |
| run: "${{ matrix.run }}" | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - validate | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build packages | |
| run: npm run build --workspaces | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: packages/*/dist | |
| key: build-${{ github.sha }}-${{ github.run_id }} | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| strategy: | |
| matrix: | |
| include: | |
| - package: "@appsignal/angular" | |
| dependencies: "@angular/[email protected]" | |
| - package: "@appsignal/angular" | |
| dependencies: "@angular/[email protected]" | |
| - package: "@appsignal/core" | |
| dependencies: '' | |
| - package: "@appsignal/javascript" | |
| dependencies: '' | |
| - package: "@appsignal/plugin-breadcrumbs-console" | |
| dependencies: '' | |
| - package: "@appsignal/plugin-window-events" | |
| dependencies: '' | |
| - package: "@appsignal/preact" | |
| dependencies: preact@latest | |
| - package: "@appsignal/preact" | |
| dependencies: [email protected] | |
| - package: "@appsignal/preact" | |
| dependencies: [email protected] | |
| - package: "@appsignal/react" | |
| dependencies: react@latest react-dom@latest | |
| - package: "@appsignal/react" | |
| dependencies: [email protected] [email protected] | |
| - package: "@appsignal/react" | |
| dependencies: [email protected] [email protected] | |
| - package: "@appsignal/react" | |
| dependencies: [email protected] [email protected] | |
| - package: "@appsignal/react" | |
| dependencies: [email protected] [email protected] @testing-library/[email protected] | |
| - package: "@appsignal/stimulus" | |
| dependencies: stimulus@latest | |
| - package: "@appsignal/stimulus" | |
| dependencies: [email protected] | |
| - package: "@appsignal/stimulus" | |
| dependencies: [email protected] | |
| - package: "@appsignal/vue" | |
| dependencies: vue@latest | |
| - package: "@appsignal/vue" | |
| dependencies: [email protected] | |
| - package: "@appsignal/vue" | |
| dependencies: [email protected] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Restore build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: packages/*/dist | |
| key: build-${{ github.sha }}-${{ github.run_id }} | |
| - name: Install test dependencies | |
| if: matrix.dependencies != '' | |
| run: npm install ${{ matrix.dependencies }} | |
| - name: Run tests | |
| run: npm test --workspace=${{ matrix.package }} |