diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..907ca7b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,85 @@ +name: CI + +on: + pull_request: + branches: + - main + +jobs: + setup: + name: Install Node and Dependencies + runs-on: ubuntu-latest + outputs: + node_version: ${{ steps.node_version.outputs.node-version }} + steps: + - uses: actions/checkout@v3 + - id: node_version + uses: actions/setup-node@v3 + with: + node-version: '18.18.2' + cache: 'npm' + - run: npm install + + unit_tests: + needs: setup + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache: npm + node-version: '18.18.2' + - run: npm install + env: + SKIP_PREPARE: true + - run: npm run test:unit + + integration_tests: + name: Run Integration Tests + needs: setup + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache: npm + node-version: '18.18.2' + - run: npm install + - run: npx playwright install + - run: npm run test:integration + env: + CI: true + + lint: + name: Run Linting + needs: setup + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache: npm + node-version: '18.18.2' + - run: npm install + env: + SKIP_PREPARE: true + - name: Run Linting + run: npm run lint + + type_check: + name: Run Type Checking + needs: setup + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + cache: npm + node-version: '18.18.2' + - run: npm install + env: + SKIP_PREPARE: true + - name: Run Type Checking + run: npm run check diff --git a/.gitignore b/.gitignore index 79518f7..55e7e4d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ node_modules .vercel /.svelte-kit /build +/test-results # OS .DS_Store diff --git a/tsconfig.json b/tsconfig.json index fc93cbd..f28e9d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { "allowJs": true, - "checkJs": true, + "checkJs": false, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true,