From 3659706bef6fb6e0077dff008a1297a0159b4178 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 | 26 ++++++++++++++++++++++++++ .github/workflows/pr.yml | 23 +++++++++++++++++++++++ 2 files changed, 49 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..cfa5b58 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +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 + with: + main-branch-name: 'master' + - 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..0121717 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,23 @@ +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 + with: + main-branch-name: 'master' + - 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