|
| 1 | +# This workflow performs tests in JavaScript. |
| 2 | +name: ESDK JavaScript CI Tests |
| 3 | + |
| 4 | +on: [pull_request, workflow_call] |
| 5 | + |
| 6 | +jobs: |
| 7 | + CI: |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + node: [18.x, 20.x, 22.x, latest] |
| 11 | + fail-fast: false |
| 12 | + runs-on: codebuild-AWS-ESDK-JS-Release-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-5.0-large |
| 13 | + permissions: |
| 14 | + id-token: write |
| 15 | + contents: read |
| 16 | + defaults: |
| 17 | + run: |
| 18 | + shell: bash |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + with: |
| 22 | + submodules: true |
| 23 | + - uses: actions/setup-node@v4 |
| 24 | + with: |
| 25 | + node-version: ${{matrix.node}} |
| 26 | + - name: Configure AWS Credentials for Tests |
| 27 | + uses: aws-actions/configure-aws-credentials@v4 |
| 28 | + with: |
| 29 | + aws-region: us-west-2 |
| 30 | + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-MPL-Dafny-Role-us-west-2 |
| 31 | + role-session-name: JavaScriptTests |
| 32 | + - name: Test Coverage Node ${{matrix.node}} |
| 33 | + env: |
| 34 | + NODE_OPTIONS: "--max-old-space-size=4096" |
| 35 | + run: | |
| 36 | + npm ci |
| 37 | + npm run build |
| 38 | + npm run coverage-node |
| 39 | + - name: Test Coverage Browser ${{matrix.node}} |
| 40 | + env: |
| 41 | + NODE_OPTIONS: "--max-old-space-size=4096" |
| 42 | + run: | |
| 43 | + npm run coverage-browser |
| 44 | + - name: Test compliance |
| 45 | + env: |
| 46 | + NODE_OPTIONS: "--max-old-space-size=4096" |
| 47 | + run: | |
| 48 | + npm run lint |
| 49 | + npm run test_conditions |
| 50 | + - name: Run Test Vectors Node ${{matrix.node}} |
| 51 | + env: |
| 52 | + NODE_OPTIONS: "--max-old-space-size=4096" |
| 53 | + NPM_CONFIG_UNSAFE_PERM: true |
| 54 | + PUBLISH_LOCAL: true |
| 55 | + run: | |
| 56 | + npm run verdaccio-publish |
| 57 | + npm run verdaccio-node-decrypt |
| 58 | + npm run verdaccio-node-encrypt |
| 59 | + - name: Run Test Vectors Browser node ${{matrix.node}} |
| 60 | + env: |
| 61 | + NODE_OPTIONS: "--max-old-space-size=4096" |
| 62 | + NPM_CONFIG_UNSAFE_PERM: true |
| 63 | + PUBLISH_LOCAL: true |
| 64 | + run: | |
| 65 | + npm run verdaccio-publish |
| 66 | + npm run verdaccio-browser-decrypt |
| 67 | + npm run verdaccio-browser-encrypt |
0 commit comments