Chore: Fix Type Stripping Error #893
Workflow file for this run
This file contains hidden or 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 | |
| env: | |
| CI: true | |
| on: | |
| push: | |
| branches: "*" | |
| paths: | |
| - packages/** | |
| pull_request: | |
| branches: "*" | |
| paths: | |
| - packages/** | |
| jobs: | |
| find-changed-packages: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| list: ${{ steps.write-output.outputs.list }} | |
| packages: ${{ steps.write-output.outputs.packages }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Find changed packages | |
| id: changed-packages | |
| uses: tj-actions/changed-files@v39 | |
| with: | |
| files: packages/** | |
| dir_names: true | |
| - name: Write output | |
| id: write-output | |
| run: | | |
| if [[ $(echo ${{ steps.changed-packages.outputs.all_changed_files }}) =~ "packages/cli" ]] || [[ $(echo ${{ steps.changed-packages.outputs.all_changed_files }}) =~ "packages/lib-ts" ]]; then | |
| PACKAGES=$(ls packages | tr '\n' ',' | sed 's/,$//;s/\([^,]*\)/"\1"/g') | |
| LIST="[$(echo ${PACKAGES// /\", \"})]" | |
| else | |
| PACKAGES=$(echo ${{ steps.changed-packages.outputs.all_changed_files }} | tr -s ' ' '\n' | grep -oP '(?<=packages/)([\w-]*)' | sort --unique | paste -sd ' ' | sed 's/\//-/g') | |
| LIST="[\"$(echo ${PACKAGES// /\", \"})\"]" | |
| fi | |
| echo "List: $LIST" | |
| echo "list=$LIST" >> "$GITHUB_OUTPUT" | |
| echo "packages={\"package\":$LIST}" >> "$GITHUB_OUTPUT" | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: find-changed-packages | |
| if: needs.find-changed-packages.outputs.list != '[""]' | |
| strategy: | |
| matrix: ${{fromJson(needs.find-changed-packages.outputs.packages)}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install | |
| shell: bash | |
| run: yarn | |
| - name: Lint | |
| run: yarn workspace @mimicprotocol/${{ matrix.package }} lint | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: find-changed-packages | |
| if: needs.find-changed-packages.outputs.list != '[""]' | |
| strategy: | |
| matrix: ${{fromJson(needs.find-changed-packages.outputs.packages)}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install | |
| shell: bash | |
| run: yarn | |
| - name: Test | |
| run: yarn workspace @mimicprotocol/${{ matrix.package }} test |