Skip to content

Commit

Permalink
Merge pull request #1749 from endojs/mfig-viable-release
Browse files Browse the repository at this point in the history
ci(viable-release): simple check that the packages are releasable
  • Loading branch information
michaelfig authored Aug 29, 2023
2 parents be35ffe + e9ee7b6 commit da2243e
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,50 @@ jobs:

- name: Run yarn test:platform-compatibility
run: cd packages/ses && yarn test:platform-compatibility

viable-release:
name: viable-release

# begin macro

runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
node-version: [16.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: pack
# Concurrency is 1 to avoid bizarre cross-package contamination.
run: yarn run lerna exec --concurrency=1 yarn pack
10 changes: 9 additions & 1 deletion packages/bundle-source/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const { Fail, quote: q } = assert;
* @typedef {object} BundleMeta
* @property {string} bundleFileName
* @property {string} bundleTime ISO format
* @property {number} bundleSize
* @property {{ relative: string, absolute: string }} moduleSource
* @property {Array<{ relativePath: string, mtime: string }>} contents
* @property {Array<{ relativePath: string, mtime: string, size: number }>} contents
*/

export const jsOpts = {
Expand Down Expand Up @@ -105,6 +106,13 @@ export const makeBundleCache = (wr, cwd, readPowers, opts) => {
return meta;
};

/**
* @param {BundleMeta} meta
* @param {string} targetName
* @param {*} rootOpt
* @param {Logger} [log]
* @returns {Promise<BundleMeta>}
*/
const validate = async (meta, targetName, rootOpt, log = defaultLog) => {
const {
bundleFileName,
Expand Down
4 changes: 3 additions & 1 deletion packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"lint-check": "yarn lint",
"lint-fix-jessie": "eslint -c '.eslintrc-jessie.js' --fix '**/*.js'",
"lint-check-jessie": "eslint -c '.eslintrc-jessie.js' '**/*.js'",
"lint": "eslint '**/*.js'"
"lint": "yarn lint:types && yarn lint:eslint",
"lint:eslint": "eslint '**/*.js'",
"lint:types": "tsc -p jsconfig.json"
},
"dependencies": {
"@agoric/babel-generator": "^7.17.4",
Expand Down

0 comments on commit da2243e

Please sign in to comment.