From cd4df7760b8439bef08329b94d8321faeaf25c7c Mon Sep 17 00:00:00 2001 From: Patrick Ammann Date: Mon, 22 Apr 2024 17:02:56 +0200 Subject: [PATCH] chore: add ci workflow --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1c73a62 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: npm + env: + CI: true + + - name: Cache incremental builds + uses: actions/cache@v3 + with: + path: | + .eslintcache + **/node_modules/.cache + key: build-${{ github.head_ref }}-${{ github.sha }} + restore-keys: | + build-${{ github.head_ref }}- + build-refs/heads/main- + + # root + #- run: | + # npm ci + # npm run build + + - name: api + run: | + npm ci + npm run build + working-directory: api + + - name: react + run: | + npm ci + npm run build + working-directory: react