diff --git a/.github/actions/pnpm-install/action.yml b/.github/actions/pnpm-install/action.yml new file mode 100644 index 000000000..e1d68fc88 --- /dev/null +++ b/.github/actions/pnpm-install/action.yml @@ -0,0 +1,8 @@ +name: "pnpm Install" +description: "Runs pnpm install with --frozen-lockfile" +runs: + using: "composite" + steps: + - name: Run pnpm install + run: pnpm install --frozen-lockfile + shell: bash diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 6e9fbc868..46fe734a2 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -8,7 +8,7 @@ inputs: cache: description: "Package manager for caching" required: false - default: "yarn" + default: "pnpm" runs: using: "composite" steps: @@ -17,3 +17,7 @@ runs: with: node-version: ${{ inputs.node-version }} cache: ${{ inputs.cache }} + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2db278ac0..5838d5a15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node - - uses: ./.github/actions/yarn-install + - uses: ./.github/actions/pnpm-install - name: Check types - run: yarn type-check + run: pnpm type-check linting: name: Linting @@ -29,10 +29,10 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node - - uses: ./.github/actions/yarn-install + - uses: ./.github/actions/pnpm-install - name: Check linting rules - run: yarn lint + run: pnpm lint unit-tests: name: Unit tests @@ -40,10 +40,10 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node - - uses: ./.github/actions/yarn-install + - uses: ./.github/actions/pnpm-install - name: Run tests - run: yarn test:unit + run: pnpm test:unit # Label of the container job integration-tests: @@ -55,26 +55,26 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node - - uses: ./.github/actions/yarn-install + - uses: ./.github/actions/pnpm-install - name: Install system dependencies run: | sudo apt-get update - name: Install playwright dependencies - run: yarn playwright install --with-deps chromium + run: pnpm playwright install --with-deps chromium - name: Create production build - run: yarn turbo build:test --filter=@rallly/web + run: pnpm turbo build:test --filter=@rallly/web - name: Start services - run: yarn docker:up + run: pnpm docker:up - name: Setup database - run: yarn db:deploy + run: pnpm db:deploy - name: Run tests - run: yarn turbo test:integration + run: pnpm turbo test:integration - name: Upload artifact playwright-report if: ${{ success() || failure() }}