refactor(eventual-send): staged #3
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: CI | |
# run CI on pushes to master, and on all PRs (even the ones that target other | |
# branches) | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
# This file has necessary redundancies since of github actions aren't supporting: | |
# - the definition of macros, which could be called from each job. | |
# - reporting the status of steps in the PR (only jobs and workflows are reported). | |
# Steps between "begin" and "end" should be the same in every job. | |
jobs: | |
lint: | |
name: lint | |
# begin macro | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x] | |
platform: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
# end macro | |
- name: Run yarn build | |
run: yarn build | |
- name: Run yarn lint | |
run: yarn lint | |
test: | |
name: test | |
# begin macro | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x] | |
platform: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
# end macro | |
- name: Run yarn build | |
run: yarn build | |
- name: Run yarn test | |
run: yarn test | |
test-async-hooks: | |
name: test-async-hooks | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: | |
# 14.2 not longer tested because the test's runner, Ava, now requires 14.19+ and fails with: | |
# Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader | |
# - '14.2' # last version before promise fast-path without destroy | |
# - '14.17' # last version before unconditional promise fast-path | |
- '14.18' # first version after unconditional promise fast-path | |
- '16.1' # last version before some significant promise hooks changes | |
- '16.5' # last version before unconditional promise fast-path | |
- '16.6' # first version after unconditional promise fast-path | |
platform: | |
- ubuntu-latest | |
# begin macro | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
# end macro | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --ignore-engines | |
- name: Run yarn build | |
run: yarn build | |
- name: Run yarn test (@endo/init) | |
working-directory: packages/init | |
run: yarn test | |
cover: | |
name: cover | |
# begin macro | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x] | |
platform: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
# end macro | |
- name: Run yarn build | |
run: yarn build | |
- name: Run yarn cover | |
run: yarn cover | |
test262: | |
name: test262 | |
# begin macro | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x] | |
platform: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
# end macro | |
- name: Run yarn build | |
run: yarn build | |
- name: Run yarn test262 | |
run: exit 0 # TODO remove test262 from required tests for CI | |
integration-test: | |
name: integration-test | |
# begin macro | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x] | |
platform: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
# end macro | |
- name: Run build-pre-release-test | |
run: ./scripts/build-pre-release-test.sh | |
- name: Run yarn test:pre-release | |
run: cd packages/ses-integration-test && yarn test:pre-release | |
platform-compatibility-test: | |
name: platform-compatibility-test | |
# begin macro | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x] | |
platform: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Echo node version | |
run: node --version | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
# end macro | |
- name: 'build' | |
run: yarn run build | |
- name: 'switch to node v12' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '12.x' | |
- name: Echo node version | |
run: node --version | |
- name: Run yarn test:platform-compatibility | |
run: cd packages/ses && yarn test:platform-compatibility |