From 0e512f4eb67dfd4d1157fdb19cfe15cc86034787 Mon Sep 17 00:00:00 2001 From: Lucas Leblanc Date: Wed, 9 Oct 2024 16:00:42 +0200 Subject: [PATCH] fix:add ci for check bug --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) 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..197a974 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: TypeScript check + run: npm run typecheck + + - name: Run tests + run: npm test + + - name: Build with Vite + run: npm run build diff --git a/package.json b/package.json index 2fb5031..3888f0a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "dev": "vite", "build": "tsc && vite build && shx cp .htaccess /var/www/bas/site/public/", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview --port 8080" + "preview": "vite preview --port 8080", + "typecheck": "tsc --noEmit" }, "dependencies": { "@emailjs/browser": "^4.1.0",