From 5fb0f437ac733da54a31ecd20beb70bce5941d3e Mon Sep 17 00:00:00 2001 From: Daniel Heidemann Date: Wed, 3 Jul 2024 19:19:22 +0200 Subject: [PATCH] next ci workflow --- .github/workflows/nextjs.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/nextjs.yml diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml new file mode 100644 index 0000000..44df9c9 --- /dev/null +++ b/.github/workflows/nextjs.yml @@ -0,0 +1,39 @@ +name: Build and Test Next.js + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + defaults: + run: + working-directory: ./frontend + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Run tests + run: npm test