Switch expect to using settings for versionsToTest #2522
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
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
CI: true | |
PNPM_CACHE_FOLDER: .pnpm-store | |
# Ensure scripts are run with pipefail. See: | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build_and_test: | |
name: build and test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
# - macos-latest # OOMs | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/*' | |
- run: npm install -g pnpm | |
- run: pnpm config set store-dir $PNPM_CACHE_FOLDER | |
- name: install | |
run: pnpm install | |
- name: lint | |
run: pnpm lint | |
- name: build | |
run: pnpm build | |
- name: test | |
run: pnpm test | |
- name: knip | |
run: pnpm knip | |
check-parse-results: | |
needs: build_and_test | |
uses: ./.github/workflows/check-parse-results.yml | |
changesets: | |
name: changesets | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/*' | |
- run: npm install -g pnpm | |
- run: pnpm install | |
- name: Check for missing changesets | |
run: | | |
PR_CHANGESETS=$(ls .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l) | |
MAIN_CHANGESETS=$(git ls-tree -r origin/main .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l) | |
# If the PR has no changesets, but main has changesets, assume this is PR is a versioning PR and exit | |
if [[ $PR_CHANGESETS -eq 0 && $MAIN_CHANGESETS -gt 0 ]]; then | |
echo "This PR is a versioning PR, exiting" | |
exit 0 | |
fi | |
git switch -c changesets-temp | |
git checkout origin/main -- packages/definitions-parser/allowedPackageJsonDependencies.txt packages/dtslint/expectedNpmVersionFailures.txt | |
pnpm changeset status --since=origin/main |