build: declare the ES2022 standard library in the tsconfigs (#3706) #2655
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 and publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| pull_request: | |
| branches: | |
| - "**" | |
| release: | |
| types: | |
| - published | |
| schedule: | |
| - cron: 0 0 * * 1-5 | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '20' | |
| check-latest: false | |
| - name: Install deps | |
| run: npm ci | |
| - name: Build | |
| run: ./tools/build.sh | |
| - name: 'Upload Artifact' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: angularfire-${{ github.run_id }} | |
| path: dist | |
| retention-days: 1 | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| needs: build | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| node: ["20", "22", "24"] | |
| fail-fast: false | |
| name: Test Node ${{ matrix.node }} (${{ matrix.os }}) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| check-latest: true | |
| - name: Install deps | |
| run: npm ci | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: angularfire-${{ github.run_id }} | |
| path: dist | |
| - name: Test Node | |
| run: | | |
| npm run build:jasmine | |
| npm run test:node | |
| browser: | |
| runs-on: ${{ matrix.os }} | |
| needs: build | |
| name: Test ${{ matrix.browser }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| browser: [ chrome-headless, firefox-headless ] | |
| # TODO(davideast): Figure out why Safari tests timeout only on CI | |
| # include: | |
| # - os: macos-latest | |
| # browser: safari | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 20 | |
| check-latest: false | |
| - name: Setup java | |
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Install deps | |
| run: npm ci | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: angularfire-${{ github.run_id }} | |
| path: dist | |
| - name: Test browser | |
| run: npm run test:${{ matrix.browser }} | |
| contribute: | |
| runs-on: ${{ matrix.os }} | |
| name: Contribute Node ${{ matrix.node }} (${{ matrix.os }}) | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| node: ["20"] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| check-latest: true | |
| - name: Install deps | |
| run: npm ci | |
| #- name: Lint | |
| # run: npm run lint | |
| - name: Build | |
| run: npm run build | |
| - name: Test Node | |
| run: | | |
| npm run build:jasmine | |
| npm run test:node | |
| - name: Setup java | |
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Test headless | |
| run: npm run test:chrome-headless | |
| # Tests are flaky on Windows | |
| continue-on-error: ${{ matrix.os == 'windows-latest' }} | |
| # Break the branch protection test into a seperate step, so we can manage the matrix more easily | |
| test_and_contribute: | |
| runs-on: ubuntu-latest | |
| name: Branch protection | |
| needs: ['test', 'contribute', 'browser'] | |
| steps: | |
| - run: true | |
| publish: | |
| runs-on: ubuntu-latest | |
| name: Publish (NPM) | |
| needs: ['build', 'test', 'browser'] | |
| if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }} | |
| steps: | |
| - name: Setup node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| check-latest: false | |
| - name: 'Download Artifacts' | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: angularfire-${{ github.run_id }} | |
| path: dist | |
| - name: Publish | |
| run: | | |
| cd ./dist/packages-dist | |
| chmod +x publish.sh | |
| ./publish.sh | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |