Upgrade api
to v0.10.0
and add ResumableTaskStore
#185
Workflow file for this run
This file contains 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: Bundling Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
web5ApiVersion: | |
description: "Select the desired @web5/api version" | |
required: false | |
dwnVersion: | |
description: "Select the desired @tbd54566975/dwn-sdk-js version" | |
required: false | |
env: | |
CI: true | |
PNPM_CACHE_FOLDER: .pnpm-store | |
jobs: | |
test-node-web5: | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [20, 18] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: β¬οΈ Checkout source | |
uses: actions/checkout@v4 | |
- name: π¦ Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: βοΈ Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
- name: π₯ Install dependencies | |
run: pnpm install | |
- name: π Update Web5 Version | |
if: ${{ github.event.inputs.web5ApiVersion }} | |
run: | | |
pnpm i -w @web5/api@${{ github.event.inputs.web5ApiVersion }} | |
- name: π§ͺ Run Web5 tests | |
run: pnpm test:web5 | |
test-node-dwn: | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [20, 18] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: β¬οΈ Checkout source | |
uses: actions/checkout@v4 | |
- name: π¦ Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: βοΈ Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
- name: π₯ Install dependencies | |
run: pnpm install | |
- name: π Update dwn-sdk-js Version | |
if: ${{ github.event.inputs.dwnVersion }} | |
run: | | |
pnpm i -w @tbd54566975/dwn-sdk-js@${{ github.event.inputs.dwnVersion }} | |
- name: π§ͺ Run DWN tests | |
run: pnpm test:dwn | |
# reference: https://github.com/remarkablemark/react-native-cli-quickstart/blob/master/.github/workflows/e2e-ios.yml | |
test-rn-ios: | |
timeout-minutes: 60 | |
runs-on: macos-latest | |
defaults: | |
run: | |
working-directory: ./tests/reactnative | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: 18 | |
cache-dependency-path: ./tests/reactnative/yarn.lock | |
- name: Install Yarn dependencies | |
run: yarn --frozen-lockfile --prefer-offline | |
- name: π Update Web5 Version | |
if: ${{ github.event.inputs.web5ApiVersion }} | |
run: | | |
yarn add @web5/api@${{ github.event.inputs.web5ApiVersion }} | |
cat package.json | |
- name: π Update dwn-sdk-js Version | |
if: ${{ github.event.inputs.dwnVersion }} | |
run: | | |
yarn add @tbd54566975/dwn-sdk-js@${{ github.event.inputs.dwnVersion }} | |
cat package.json | |
- name: Install macOS dependencies | |
run: | | |
brew tap wix/brew | |
brew install applesimutils | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
# useful to debug supported devices in action runner | |
# - name: List available simulator devices | |
# run: applesimutils --list | |
- name: Restore CocoaPods | |
id: restore-cocoapods | |
uses: actions/cache/restore@v3 | |
with: | |
path: tests/reactnative/ios/Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('tests/reactnative/ios/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: Install CocoaPods | |
run: NO_FLIPPER=1 cd ios && pod install ; cd .. | |
- name: Save CocoaPods | |
uses: actions/cache/save@v3 | |
if: success() | |
id: save-cocoapods | |
with: | |
path: tests/reactnative/ios/Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('tests/reactnative/ios/Podfile.lock') }} | |
- name: Restore Detox build | |
id: restore-detox-build | |
uses: actions/cache/restore@v3 | |
with: | |
path: tests/reactnative/ios/build | |
key: ${{ runner.os }}-detox-${{ hashFiles('tests/reactnative/ios/Podfile.lock') }} | |
- name: Detox build | |
if: steps.restore-detox-build.outputs.cache-hit != 'true' | |
run: yarn detox build --configuration ios.sim.debug | |
- name: Save Detox Build | |
uses: actions/cache/save@v3 | |
if: success() | |
id: save-detox-build | |
with: | |
path: tests/reactnative/ios/build | |
key: ${{ runner.os }}-detox-${{ hashFiles('tests/reactnative/ios/Podfile.lock') }} | |
- name: Run tests | |
run: yarn test | |
- name: Upload artifacts | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-rn-ios-detox-artifacts | |
path: tests/reactnative/artifacts | |
test-browsers: | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: | |
[ | |
"desktop-safari", | |
"desktop-chrome", | |
"desktop-firefox", | |
"desktop-edge", | |
"mobile-safari", | |
"mobile-chrome", | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: π Update Web5 Version | |
if: ${{ github.event.inputs.web5ApiVersion }} | |
run: | | |
pnpm i -w @web5/api@${{ github.event.inputs.web5ApiVersion }} | |
cat package.json | |
- name: π Update dwn-sdk-js Version | |
if: ${{ github.event.inputs.dwnVersion }} | |
run: | | |
pnpm i -w @tbd54566975/dwn-sdk-js@${{ github.event.inputs.dwnVersion }} | |
cat package.json | |
- name: Install Playwright Browsers | |
run: pnpm playwright install --with-deps | |
- name: Run browser tests | |
run: TEST_PARAMS="--project=${{ matrix.browser }} --trace=on" pnpm test:browser | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
test-electron: | |
if: false # We are skipping `test-electron` due to the lack of support for `AES-KW` key wrapping. Will revisit. | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: ./tests/electron-vite | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: 18 | |
cache-dependency-path: ./tests/electron-vite/yarn.lock | |
- name: Install Yarn dependencies | |
run: yarn --frozen-lockfile --prefer-offline | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
- name: π Update Web5 Version | |
if: ${{ github.event.inputs.web5ApiVersion }} | |
run: | | |
yarn add @web5/api@${{ github.event.inputs.web5ApiVersion }} | |
cat package.json | |
- name: π Update dwn-sdk-js Version | |
if: ${{ github.event.inputs.dwnVersion }} | |
run: | | |
yarn add @tbd54566975/dwn-sdk-js@${{ github.event.inputs.dwnVersion }} | |
cat package.json | |
- name: Build electron app | |
run: yarn build | |
- name: Run electron tests | |
run: yarn test --trace=on | |
if: matrix.os != 'ubuntu-latest' | |
- name: Run electron tests (xvfb) | |
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test --trace=on | |
if: matrix.os == 'ubuntu-latest' | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: tests/electron-vite/playwright-report/ | |
retention-days: 30 |