-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat/#12/configure pipelines
- Loading branch information
Showing
24 changed files
with
10,091 additions
and
5,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
versioning-strategy: increase | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Description | ||
|
||
<!-- Please include a summary of the changes. --> | ||
|
||
## Testing Done | ||
|
||
<!-- Describe the tests you have conducted to verify your changes. --> | ||
|
||
## Type of change | ||
|
||
- [ ] Bug fix (non-breaking change that resolves an issue) | ||
- [ ] New feature (non-breaking change that adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to break) | ||
- [ ] Documentation update required for this change | ||
|
||
## Checklist: | ||
|
||
- [ ] My code adheres to the style guidelines of this project | ||
- [ ] I have performed a self-review of my code | ||
- [ ] I have added comments to my code, especially in complex areas | ||
- [ ] I have updated the documentation accordingly | ||
- [ ] My changes do not introduce any new warnings | ||
- [ ] I have added tests to validate the effectiveness of my fix or the functionality of my feature | ||
- [ ] Both new and existing unit tests pass locally with my changes | ||
- [ ] I have considered and addressed any potential security implications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: Pull request | ||
|
||
# Controls when the action will run. | ||
on: | ||
pull_request: | ||
|
||
# Global environment variables | ||
# env: | ||
# CI: true | ||
|
||
# Jobs | ||
jobs: | ||
# # Validate PR title | ||
# !todo discuss this job step is this overkill? | ||
# validate_pr_title: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: amannn/action-semantic-pull-request@v5 | ||
# id: lint_pr_title | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - uses: marocchino/sticky-pull-request-comment@v2 | ||
# if: always() && (steps.lint_pr_title.outputs.error_message != null) | ||
# with: | ||
# header: pr-title-lint-error | ||
# message: | | ||
# Hey there and thank you for opening this pull request! 👋🏼 | ||
|
||
# We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. | ||
|
||
# Details: | ||
|
||
# ``` | ||
# ${{ steps.lint_pr_title.outputs.error_message }} | ||
# ``` | ||
# - if: ${{ steps.lint_pr_title.outputs.error_message == null }} | ||
# uses: marocchino/sticky-pull-request-comment@v2 | ||
# with: | ||
# header: pr-title-lint-error | ||
# delete: true | ||
|
||
# Set up tests | ||
set_up: | ||
name: Set up | ||
runs-on: ubuntu-latest | ||
# needs: [validate_pr_title] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "yarn" | ||
cache-dependency-path: ${{github.workspace}}/frontend/package-lock.json | ||
- run: yarn install --immutable | ||
|
||
# Lint job | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
needs: [set_up] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
cache-dependency-path: ${{github.workspace}}/frontend/package-lock.json | ||
|
||
- name: Install packages | ||
working-directory: ./frontend | ||
run: yarn install | ||
|
||
- name: Run lint | ||
working-directory: ./frontend | ||
run: yarn lint | ||
|
||
# Tests | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
needs: [set_up] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "yarn" | ||
cache-dependency-path: ${{github.workspace}}/frontend/package-lock.json | ||
- name: Install packages | ||
working-directory: ./frontend | ||
run: yarn install | ||
- name: Run tests | ||
working-directory: ./frontend | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env sh | ||
[ "$HUSKY" = "2" ] && set -x | ||
h="${0##*/}" | ||
s="${0%/*/*}/$h" | ||
|
||
[ ! -f "$s" ] && exit 0 | ||
|
||
for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do | ||
# shellcheck disable=SC1090 | ||
[ -f "$f" ] && . "$f" | ||
done | ||
|
||
[ "${HUSKY-}" = "0" ] && exit 0 | ||
|
||
sh -e "$s" "$@" | ||
c=$? | ||
|
||
[ $c != 0 ] && echo "husky - $h script failed (code $c)" | ||
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH" | ||
exit $c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
. "$(dirname -- "$0")/common.sh" | ||
|
||
yarn commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
command_exists () { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
||
# Workaround for Windows 10, Git Bash, and Yarn | ||
if command_exists winpty && test -t 1; then | ||
exec < /dev/tty | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function changed { | ||
git diff --name-only HEAD@{1} HEAD | grep "^$1" >/dev/null 2>&1 | ||
} | ||
|
||
echo 'Checking for changes in yarn.lock...' | ||
|
||
if changed 'yarn.lock'; then | ||
echo "📦 yarn.lock changed. Run yarn install to bring your dependencies up to date." | ||
yarn install | ||
fi | ||
|
||
echo 'You are up to date :)' | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { Config } from 'jest' | ||
import nextJest from 'next/jest.js' | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: './', | ||
}) | ||
|
||
// Add any custom config to be passed to Jest | ||
const config: Config = { | ||
coverageProvider: 'v8', | ||
testEnvironment: 'jsdom', | ||
// Add more setup options before each test is run | ||
// setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'], | ||
} | ||
|
||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
export default createJestConfig(config) |
Oops, something went wrong.