patch: migrate to gitea actions
This commit is contained in:
108
.gitea/workflows/pr.yml
Normal file
108
.gitea/workflows/pr.yml
Normal file
@@ -0,0 +1,108 @@
|
||||
name: PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
install:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Upload node_modules
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: node-modules
|
||||
path: node_modules/
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: install
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
|
||||
- name: Restore node_modules
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: node-modules
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: install
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
|
||||
- name: Restore node_modules
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: node-modules
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: install
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "npm"
|
||||
|
||||
- name: Restore node_modules
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: node-modules
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Generate dev cert
|
||||
run: ./scripts/gen-dev-cert.sh
|
||||
|
||||
- name: Run e2e tests
|
||||
run: npm run test:e2e
|
||||
env:
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
||||
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build (dry run)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: ${{ github.server_url }}/${{ github.repository }}:latest
|
||||
Reference in New Issue
Block a user