name: build-and-test on: push: branches: - master - develop pull_request: branches: - master - develop env: PNPM_CACHE_FOLDER: .pnpm-store jobs: build-and-test: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest] node: [14] steps: - name: Checkout ๐Ÿ›Ž uses: actions/checkout@master - name: Setup node env ๐Ÿ— uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} check-latest: true - uses: pnpm/action-setup@v2.2.2 name: Install pnpm with: version: 7 run_install: false - name: Setup pnpm config ๐Ÿ— run: pnpm config set store-dir $PNPM_CACHE_FOLDER - name: Cache node_modules ๐Ÿ“ฆ uses: actions/cache@v3 id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) with: path: $PNPM_CACHE_FOLDER key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }} restore-keys: | ${{ runner.os }}-pnpm- - name: Install dependencies ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป run: pnpm install --no-frozen-lockfile - name: Run linter ๐Ÿงน run: pnpm lint - name: Build Library ๐Ÿ‘ท run: pnpm build --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" - name: Run tests ๐Ÿงช run: pnpm test