Skip to content

Commit

Permalink
Merge pull request #68 from JacobTheEldest/SetupTesting
Browse files Browse the repository at this point in the history
Setup testing
  • Loading branch information
JacobTheEldest authored May 19, 2023
2 parents ad2925a + 1692144 commit d890362
Show file tree
Hide file tree
Showing 8 changed files with 2,474 additions and 40 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Install packages
- name: Install dependencies
run: npm ci

- name: Check code formatting with Prettier
Expand Down Expand Up @@ -54,3 +54,22 @@ jobs:
- name: Validate PR commits with commitlint
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Install dependencies
run: npm ci

- name: Run tests with vitest
run: npm run test:once
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,33 @@

This project is my testbed for improving my code workflow to comply with best practices.

Code Formatting

- [x] Code formatting with prettier
- [x] CI check during pull request for code formatting
- [ ] Pre-commit hook for code formatting
- [x] CI check during pull request for code formatting

Code Linting

- [x] Code linting with eslint
- [x] CI check during pull request for code linting
- [ ] Pre-commit hook for code linting
- [ ] Testing
- [ ] CI check for tests
- [x] CI check during pull request for code linting

Testing

- [x] Testing with Vitest and React Testing Library
- [ ] Pre-commit hook for tests
- [ ] CI check for tests
- [ ] CI check for test coverage

Convential Commits

- [x] Conventional Commits optionally generated with commitizen
- [x] Conventional Commits enforced by pre-commit hook
- [x] Conventional Commits enforced by CI check

Versioning and Build

- [x] Semantic Versioning as part of the CI/CD pipeline with semantic-release
- [x] Build new docker image on each release

Expand Down
Loading

0 comments on commit d890362

Please sign in to comment.