Skip to content

Commit

Permalink
AngularFire v16 (#3449)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdaniels committed Oct 25, 2023
1 parent 5793d6f commit 78407bc
Show file tree
Hide file tree
Showing 48 changed files with 25,903 additions and 24,912 deletions.
105 changes: 35 additions & 70 deletions .github/workflows/test.yml
Expand Up @@ -26,29 +26,25 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18'
check-latest: true
check-latest: false
- name: angular build cache
uses: actions/cache@v3
with:
path: ./.angular
key: angular-cache
- name: node_modules cache
uses: actions/cache@v3
id: node_modules_cache
with:
path: ./node_modules
key: ${{ runner.os }}-16-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
- name: Yarn offline cache
if: steps.node_modules_cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: ~/.npm-packages-offline-cache
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-18-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-18-
- name: Install deps
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: |
yarn config set ignore-engines true
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
npm ci
- name: Build
id: yarn-pack-dir
run: ./tools/build.sh
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -79,36 +75,20 @@ jobs:
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-16-9-12-8-node_modules-${{ hashFiles('yarn.lock') }}
- name: Yarn offline cache
uses: actions/cache@v3
with:
path: ~/.npm-packages-offline-cache
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
- name: Configure yarn
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set ignore-engines true
- name: Yarn install
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-
- name: Install deps
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --prefer-offline
run: npm ci
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Relocate Artifacts
run: mv angularfire-${{ github.run_id }} dist
- name: Test Node
run: |
yarn build:jasmine
yarn test:node
- name: ng-build yarn install
run: |
cd ./test/ng-build
yarn --prefer-offline
- name: ng-build prerender
run: |
cd ./test/ng-build
yarn prerender
npm run build:jasmine
npm run test:node
browser:
runs-on: ${{ matrix.os }}
Expand All @@ -122,14 +102,15 @@ jobs:
# include:
# - os: macos-latest
# browser: safari
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
check-latest: false
- name: Setup java
uses: actions/setup-java@v3
with:
Expand All @@ -140,20 +121,12 @@ jobs:
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-16-9-12-8-node_modules-${{ hashFiles('yarn.lock') }}
- name: Yarn offline cache
uses: actions/cache@v3
with:
path: ~/.npm-packages-offline-cache
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
- name: Configure yarn
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set ignore-engines true
- name: Yarn install
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-
- name: Install deps
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --prefer-offline
run: npm ci
- name: Firebase emulator cache
uses: actions/cache@v3
with:
Expand All @@ -164,7 +137,7 @@ jobs:
- name: Relocate Artifacts
run: mv angularfire-${{ github.run_id }} dist
- name: Test browser
run: yarn test:${{ matrix.browser }}
run: npm run test:${{ matrix.browser }}

contribute:
runs-on: ${{ matrix.os }}
Expand All @@ -187,28 +160,20 @@ jobs:
id: node_modules_cache
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
- name: Yarn offline cache
if: steps.node_modules_cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: ~/.npm-packages-offline-cache
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-
- name: Install deps
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set ignore-engines true
yarn install --frozen-lockfile --prefer-offline
run: npm ci
- name: Lint
run: yarn lint
run: npm run lint
- name: Build
run: yarn build
run: npm run build
- name: Test Node
run: |
yarn build:jasmine
yarn test:node
npm run build:jasmine
npm run test:node
- name: Firebase emulator cache
uses: actions/cache@v3
with:
Expand All @@ -220,7 +185,7 @@ jobs:
distribution: 'temurin'
java-version: '11'
- name: Test headless
run: yarn test:chrome-headless
run: npm run test:chrome-headless
# Tests are flaky on Windows
continue-on-error: ${{ matrix.os == 'windows-latest' }}

Expand All @@ -243,7 +208,7 @@ jobs:
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
check-latest: true
check-latest: false
- name: 'Download Artifacts'
uses: actions/download-artifact@v3
- name: Publish
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -13,7 +13,7 @@ angularfire2-*.tgz
.DS_Store
yarn-error.log
*.bak
package-lock.json
yarn.lock
test/ng-build/**/yarn.lock
tools/build.js
coverage
Expand Down

0 comments on commit 78407bc

Please sign in to comment.