Skip to content

Commit

Permalink
ci(github): prepare configuration for github
Browse files Browse the repository at this point in the history
  • Loading branch information
Kordrad committed Apr 23, 2024
1 parent db36b1a commit ca9de3f
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
# Maintain dependencies for npm dependencies
- package-ecosystem: "npm"
directory: "/"
target-branch: develop
schedule:
interval: "weekly"
day: sunday
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
target-branch: develop
directory: "/"
schedule:
interval: "weekly"
day: sunday
76 changes: 76 additions & 0 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Check pull request

on:
pull_request:
branches: [master, develop]

env:
NODE_VERSION: 18
RETENTION_DAYS: 30

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm run lint
- uses: actions/upload-artifact@v4
if: always()
with:
name: lint-report
path: lint-report/
retention-days: ${{env.RETENTION_DAYS}}

performance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm run performance
- uses: actions/upload-artifact@v4
if: always()
with:
name: performance-report
path: performance-report/
retention-days: ${{env.RETENTION_DAYS}}

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm run test
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-report
path: test-report/
retention-days: ${{env.RETENTION_DAYS}}

build:
needs: [lint, performance, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
if: always()
with:
name: build-report
path: build-report/
retention-days: ${{env.RETENTION_DAYS}}

130 changes: 130 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"format": "prettier --ignore-unknown **/*",
"format:write": "prettier --write --ignore-unknown **/*",
"stylelint": "stylelint **/*.{css,scss}",
"performance": "npx oxlint -D correctness -D perf --deny-warnings",
"stylelint:fix": "stylelint **/*.{css,scss} --fix"
},
"private": true,
Expand Down Expand Up @@ -53,6 +54,7 @@
"jasmine-core": "~5.1.0",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"oxlint": "^0.3.1",
"prettier": "^3.2.5",
"prettier-plugin-organize-attributes": "^1.0.0",
"stylelint": "^16.3.1",
Expand Down

0 comments on commit ca9de3f

Please sign in to comment.