feat: modernize #12
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: lineal-viz | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| paths: | |
| - 'lineal-viz/**' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/ci-lineal-viz.yml' | |
| pull_request: | |
| paths: | |
| - 'lineal-viz/**' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/ci-lineal-viz.yml' | |
| concurrency: | |
| group: ci-lineal-viz-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: 'Lint' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm -F lineal-viz lint | |
| test: | |
| name: 'Tests' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run Tests | |
| run: pnpm -F lineal-viz test | |
| # For the Try Scenarios | |
| - id: set-matrix | |
| working-directory: lineal-viz | |
| run: | | |
| echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT | |
| floating: | |
| name: 'Floating Dependencies' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm install --no-lockfile | |
| - name: Run Tests | |
| run: pnpm -F lineal-viz test | |
| try-scenarios: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| needs: 'test' | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{fromJson(needs.test.outputs.matrix)}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| - name: Apply Scenario | |
| working-directory: lineal-viz | |
| run: | | |
| pnpm dlx @embroider/try apply ${{ matrix.name }} | |
| - name: Install Dependencies | |
| run: pnpm install --no-lockfile | |
| - name: Run Tests | |
| run: | | |
| pnpm -F lineal-viz test | |
| env: ${{ matrix.env }} |