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