From f2ed9f6276d066eb6b3ef116b05a0f62426e3868 Mon Sep 17 00:00:00 2001 From: Seb-sti1 <65665540+Seb-sti1@users.noreply.github.com> Date: Sat, 2 Sep 2023 16:28:17 +0200 Subject: [PATCH] Create CI --- .github/workflows/main.yml | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..4d7c4497 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +# use Ubuntu 22.04 & Node 18 +name: Build & Test + +on: [pull_request] + +jobs: + backend: + runs-on: ubuntu-22.04 + defaults: + run: + working-directory: backend + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: Install dependencies + run: npm ci + - name: Run prettier + run: npx prettier . --check + - name: Build + run: npm run build + - name: Tests + run: npm run test + + frontend: + runs-on: ubuntu-22.04 + defaults: + run: + working-directory: frontend + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: Install dependencies + run: npm ci + - name: Run prettier on frontend + run: npx prettier . --check + - name: Build + run: npm run build + - name: Tests + run: npm run test