From b7d45cd2d9bff906a90b4fac73a67e2a2113687d Mon Sep 17 00:00:00 2001 From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Date: Sat, 31 Aug 2024 19:54:49 +0200 Subject: [PATCH] ci: setup GitHub actions --- .github/workflows/ci.yml | 110 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..a28ebd2f24 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,110 @@ +name: CI + +on: + push: + branches: + - main + pull_request: {} + +permissions: + actions: read + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +jobs: + install: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + cache-dependency-path: 'yarn.lock' + - run: yarn --frozen-lockfile --non-interactive + + lint-affected: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + cache-dependency-path: 'yarn.lock' + - run: yarn --frozen-lockfile --non-interactive + - uses: nrwl/nx-set-shas@v4 + - run: yarn nx affected -t lint + + test-affected: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + cache-dependency-path: 'yarn.lock' + - run: yarn --frozen-lockfile --non-interactive + - uses: nrwl/nx-set-shas@v4 + - run: yarn nx affected -t test + + e2e-affected: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + cache-dependency-path: 'yarn.lock' + - run: yarn --frozen-lockfile --non-interactive + - uses: nrwl/nx-set-shas@v4 + - run: yarn nx affected -t e2e --exclude=docs-app + + build-affected: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + cache-dependency-path: 'yarn.lock' + - run: yarn --frozen-lockfile --non-interactive + - uses: nrwl/nx-set-shas@v4 + - run: yarn nx build -t test + + schematics-core-check: + runs-on: ubuntu-latest + needs: install + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + cache-dependency-path: 'yarn.lock' + - run: yarn --frozen-lockfile --non-interactive + - uses: nrwl/nx-set-shas@v4 + - run: yarn copy:schematics + - run: yarn schematics:check