From da2e9ff26cdf95bbccf1a974e1078a5df8c35513 Mon Sep 17 00:00:00 2001 From: Mordechai Dror Date: Wed, 5 Jun 2024 10:43:56 +0300 Subject: [PATCH] add github actions --- .github/workflows/ci-cd.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/setup.yml | 16 ++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/ci-cd.yml create mode 100644 .github/workflows/setup.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..7b5db78 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,32 @@ +name: CI/CD + +on: push + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/setup.yml + + - run: npm run format:check + + lint: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/setup.yml + + - run: npm run lint:check + + test: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/setup.yml + + - run: npm run test + + build: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/setup.yml + + - run: npm run build diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml new file mode 100644 index 0000000..273850d --- /dev/null +++ b/.github/workflows/setup.yml @@ -0,0 +1,16 @@ +name: Setup + +on: workflow_call + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - run: npm ci --ignore-scripts --no-audit