Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build GitHub Action test list from package.json, or at least compare them automatically #579

Open
warner opened this issue Feb 19, 2020 · 0 comments
Labels
tooling repo-wide infrastructure

Comments

@warner
Copy link
Member

warner commented Feb 19, 2020

Our CI configuration displays test results from each package on a separate line, making it a lot easier to see which test is failing:

Screenshot_2020-02-19 Agoric agoric-sdk

To accomplish this, our .github/workflows/test-all-packages.yml has a list of steps, each of which runs a single package's tests:

    - name: yarn test (acorn-eventual-send)
      run: cd packages/acorn-eventual-send && yarn test
    - name: yarn test (agoric-cli)
      run: cd packages/agoric-cli && yarn test
    - name: yarn test (assert)
      run: cd packages/assert && yarn test
    - name: yarn test (autoswap-frontend)
      run: cd packages/autoswap-frontend && yarn test
   ...

The actual set of packages is defined by our top-level package.json, in the workspaces: key:

  "workspaces": [
    "packages/assert",
    "packages/import-manager",
    "packages/make-promise",
    "packages/sparse-ints",
    "packages/registrar",

Having this defined in two separate places is a maintenance hassle and a footgun (it's easy to add a new package and forget to add it to the CI list, which means tests don't get run).

This ticket is about creating a script that parses both files and complains if the lists don't contain the same items. We can probably allow the order to differ: we currently keep workspaces: in dependency order (so that yarn build constructs things in the correct order), whereas package.json is currently alphabetical. (using lerna might allow us to keep both in alphabetical order). But the set of entries from one must equal the set from the other. The script should display the difference. Bonus points for a script that can generate a new test-all-packages.yml from the package.json and a template of some sort.

@warner warner changed the title build GitHub Action test list from package.json build GitHub Action test list from package.json, or at least compare them automatically Feb 19, 2020
@warner warner added the tooling repo-wide infrastructure label Feb 19, 2020
erights added a commit that referenced this issue Mar 5, 2021
erights added a commit that referenced this issue Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling repo-wide infrastructure
Projects
None yet
Development

No branches or pull requests

2 participants