# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: SwaggerEditor build on: push: branches: [main] pull_request: branches: [main] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: submodules: true - name: Use Node.js uses: actions/setup-node@v7 with: node-version-file: .nvmrc cache-dependency-path: package-lock.json - name: Install dependencies run: npm ci - name: Lint commit message if: github.ref != 'refs/heads/main' && github.actor != 'dependabot[bot]' run: git log -1 --pretty=format:"%s" | npx commitlint - name: Lint code run: npm run lint - name: Unit tests run: npm test env: CI: true - name: Build App artifacts run: npm run build:app - name: Upload build artifacts if: github.ref == 'refs/heads/main' uses: actions/upload-artifact@v7 with: name: build path: ./build - name: Install Playwright browsers run: npm run pw:install - name: E2E Tests run: npm run pw:ci env: CI: true