diff --git a/.gitea/workflows/test-branches.yaml b/.gitea/workflows/test-branches.yaml new file mode 100644 index 0000000..4926874 --- /dev/null +++ b/.gitea/workflows/test-branches.yaml @@ -0,0 +1,47 @@ +name: Run Tests on Branches + +on: + push: + branches-ignore: + - 'main' + +jobs: + test-backend: + name: Backend Tests + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: backend/package-lock.json + + - name: Install Backend Dependencies + run: cd backend && npm ci + + - name: Run Backend Tests + run: cd backend && npm test -- --ci + + test-frontend: + name: Frontend Tests + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: frontend/package-lock.json + + - name: Install Frontend Dependencies + run: cd frontend && npm ci + + - name: Run Frontend Tests + run: cd frontend && npm test -- --run --reporter=basic