feat: r2 support #28
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: Run JS SDK test | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
run-js-tests: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install -g [email protected] | |
- name: Install packages in js folder | |
run: cd js && pnpm install | |
- name: pnpm build | |
run: cd js && pnpm build | |
- name: run test | |
run: cd js && pnpm test:coverage | |
- name: install aws cli | |
run: sudo apt-get install awscli | |
- name: Upload `coverage` folder to R2 | |
uses: ryand56/r2-upload-action@latest | |
with: | |
r2-account-id: 4d4f16c61d89ec64e760039c4ec50717 | |
r2-access-key-id: d1e51cf08ce14b98079755fdbc6e3048 | |
r2-secret-access-key: 082cb88d66644cbd83dbf0c1900aa592fd2264e8f1c73cebb1f538052286c784 | |
r2-bucket: github-action | |
source-dir: js/coverage | |
destination-dir: coverage-${{ github.run_id }}/coverage | |
- name: Print unique URL | |
run: | | |
echo "URL: 'https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-${{ github.run_id }}/coverage/index.html'" | |
- name: Upload jest html-reporters folder to R2 | |
uses: ryand56/r2-upload-action@latest | |
with: | |
r2-account-id: 4d4f16c61d89ec64e760039c4ec50717 | |
r2-access-key-id: de51cf08ce14b98079755fdbc6e3048 | |
r2-secret-access-key: cb88d66644cbd83dbf0c1900aa592fd2264e8f1c73cebb1f538052286c784 | |
r2-bucket: github-action | |
source-dir: js/html-report | |
destination-dir: html-report-${{ github.run_id }}/html-report | |
- name: Print HTML report folder unique URL | |
run: | | |
echo "HTML report folder unique URL: 'https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-${{ github.run_id }}/html-report/'" |