From a41190331f8e0c8b987e7d15652fbc7689eb616e Mon Sep 17 00:00:00 2001 From: Lean Date: Sun, 27 Aug 2023 17:15:12 +0200 Subject: [PATCH] github actions: add more checks to the pipeline --- .editorconfig | 3 ++ .github/workflows/push-pipeline.yml | 61 +++++++++++++++++++++++++++++ .github/workflows/tests.yml | 28 ------------- 3 files changed, 64 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/push-pipeline.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.editorconfig b/.editorconfig index 006e28f0..df4ff707 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,6 @@ trim_trailing_whitespace = true [*.json] indent_size = 2 + +[*.yml] +indent_size = 2 diff --git a/.github/workflows/push-pipeline.yml b/.github/workflows/push-pipeline.yml new file mode 100644 index 00000000..83f01ee4 --- /dev/null +++ b/.github/workflows/push-pipeline.yml @@ -0,0 +1,61 @@ +name: push-pipeline +run-name: ${{ github.workflow }} - ${{ github.actor }} - Attempt ${{ github.run_attempt }} +on: [push] +jobs: + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install node modules + run: npm install + - name: Generate prisma client + run: npm run db:apply-change + - name: Run unit tests + run: npm run test:unit + integration-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install node modules + run: npm install + - name: Run integration tests + run: npm run test:integration + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install node modules + run: npm install + - name: Lint code + run: npm run lint + build-storybook: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install node modules + run: npm install + - name: Build storybook + run: npm run storybook:build + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install node modules + run: npm install + - name: Build storybook + run: npm run vercel-build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 2d2d05d1..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: tests -run-name: ${{ github.workflow }} - ${{ github.actor }} - Attempt ${{ github.run_attempt }} -on: [push] -jobs: - unit-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18' - - name: Install node modules - run: npm install - - name: Generate prisma client - run: npm run db:apply-change - - name: Run unit tests - run: npm run test:unit - integration-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18' - - name: Install node modules - run: npm install - - name: Run integration tests - run: npm run test:integration