ci: changed the command 'run-many' to 'affected' in test.sh and build.sh #60
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
- ready_for_review | |
- reopened | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: nrwl/nx-set-shas@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
shell: bash | |
run: ./scripts/install.sh | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Build and prepare for tests | |
shell: bash | |
run: | | |
pnpm install | |
source ./scripts/devenv.sh | |
mkdir -p /home/runner/.config/solana/ | |
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json | |
- run: npx nx affected -t build --parallel=3 | |
- run: npx nx affected -t test --parallel=3 |