From 334ba892bf143b9e92e1416a04d942c3dd8c8b1e Mon Sep 17 00:00:00 2001 From: George Enciu Date: Sat, 8 Jul 2023 22:39:56 +0200 Subject: [PATCH] adds workflow files #7 --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ .github/workflows/pr.yml | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0cf3ad0 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: Build and deploy +on: + pull_request: + types: + - "closed" + branches: + - "master" + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: nrwl/nx-set-shas@v3 + - run: npm ci + + - run: npx nx format:check + - run: npx nx affected -t lint --parallel=3 + - run: npx nx affected -t pretest --parallel=3 + - run: npx nx affected -t test --parallel=3 --configuration=ci + - run: npx nx affected -t posttest --parallel=3 + - run: npx nx affected -t build --parallel=3 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..2d26b09 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,21 @@ +name: Run on PR +on: + pull_request: + + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: nrwl/nx-set-shas@v3 + - run: npm ci + + - run: npx nx format:check + - run: npx nx affected -t lint --parallel=3 + - run: npx nx affected -t pretest --parallel=3 + - run: npx nx affected -t test --parallel=3 --configuration=ci + - run: npx nx affected -t posttest --parallel=3 + - run: npx nx affected -t build --parallel=3