Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/cd: gains GH action to automate checks and tests #25

Merged
merged 12 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
.vercel
/.svelte-kit
/build
/test-results

# OS
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"checkJs": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
Expand Down
Loading