Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into quiz-type-migration
Browse files Browse the repository at this point in the history
# Conflicts:
#	services/quizzes/package-lock.json
#	services/quizzes/package.json
#	services/quizzes/src/components/QuizEditForms/QuizItem/MultipleChoiceContent/MultipleChoiceModalContent.tsx
#	system-tests/src/__screenshots__/history/history.spec.ts/initial-page-desktop-regular.png
#	system-tests/src/__screenshots__/history/history.spec.ts/initial-page-mobile-tall.png
#	system-tests/src/__screenshots__/history/history.spec.ts/page-after-restore-desktop-regular.png
#	system-tests/src/__screenshots__/history/history.spec.ts/page-after-restore-mobile-tall.png
#	system-tests/src/__screenshots__/model-solution.spec.ts/model-solutions-in-exercises-desktop-regular.png
#	system-tests/src/__screenshots__/model-solution.spec.ts/model-solutions-in-exercises-mobile-tall.png
#	system-tests/src/__screenshots__/multiple-tasks-exercise-tests/enable-resubmitting.spec.ts/after-answering-resubmitting-test-desktop-regular.png
#	system-tests/src/__screenshots__/multiple-tasks-exercise-tests/enable-resubmitting.spec.ts/resubmit-after-answering-resubmitting-test-desktop-regular.png
#	system-tests/src/__screenshots__/multiple-tasks-exercise-tests/enable-resubmitting.spec.ts/resubmit-before-answering-resubmitting-test-desktop-regular.png
#	system-tests/src/__screenshots__/proposed-edits/proposed-edits.spec.ts/after-changes-desktop-regular.png
#	system-tests/src/__screenshots__/proposed-edits/proposed-edits.spec.ts/after-changes-mobile-tall.png
#	system-tests/src/__screenshots__/proposed-edits/proposed-edits.spec.ts/no-edits-yet-desktop-regular.png
#	system-tests/src/__screenshots__/proposed-edits/proposed-edits.spec.ts/no-edits-yet-mobile-tall.png
  • Loading branch information
d471061c committed Aug 24, 2023
2 parents 31c202b + e1f3b53 commit 91c6848
Show file tree
Hide file tree
Showing 1,132 changed files with 49,111 additions and 15,274 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

const DETECT_CSS_REGEX = /\S+:\s+[^\n]+;/
const DETECT_PX_REGEX = /^\d+px$/
const DETECT_REM_REGEX = /^\d+rem$/
const DETECT_EM_REGEX = /^\d+em$/
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"plugin:@next/next/recommended",
"plugin:@tanstack/eslint-plugin-query/recommended",
"plugin:i18next/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
Expand All @@ -28,13 +32,15 @@ module.exports = {
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react", "@typescript-eslint", "import", "eslint-custom-rules"],
plugins: ["react", "@typescript-eslint", "@tanstack/query", "import", "eslint-custom-rules"],
settings: {
react: {
version: "detect",
},
},
rules: {
// Should be investigated later
"@next/next/no-img-element": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"no-unused-vars": "off",
Expand Down Expand Up @@ -216,7 +222,7 @@ module.exports = {
"labelStyle",
"data-testid",
],
ignore: [DETECT_CSS_REGEX, DETECT_PX_REGEX],
ignore: [DETECT_CSS_REGEX, DETECT_PX_REGEX, DETECT_REM_REGEX, DETECT_EM_REGEX],
ignoreCallee: [
"div",
"useQuery",
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/system-tests-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- name: Run npm ci so that shared module gets copied
run: npm ci

- name: Build
run: bin/download-tmc-langs

- name: Build
run: bin/skaffold-build-test-env-and-serialize-output

Expand Down
3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"font-family-no-missing-generic-family-keyword": null,
"no-duplicate-selectors": null,
"function-no-unknown": null,
"media-query-no-invalid": null,
"selector-type-no-unknown": [
true,
{
Expand All @@ -26,4 +27,4 @@
"customSyntax": "postcss-styled-syntax"
}
]
}
}
16 changes: 15 additions & 1 deletion bin/.common
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function fail_minikube_version() {

function check_sqlx_cli_version() {
# just to be sure
MINIMUM_ACCEPTABLE_VERSION="0.6.2"
MINIMUM_ACCEPTABLE_VERSION="0.7.1"
ensure_program_in_path cargo
ensure_program_in_path cargo-sqlx
SQLX=$(cargo sqlx --version | cut -d ' ' -f 2)
Expand Down Expand Up @@ -129,3 +129,17 @@ function point_docker_cli_to_minikube_docker() {
eval "$(minikube -p minikube docker-env --shell bash)"
echo ""
}

function ensure_tmc_langs_cli_downloaded() {
path_to_tmc=$(relativize_path "../services/tmc")
path_to_tmc_version="$path_to_tmc"/tmc-langs-version
tmc_version=$(< "$path_to_tmc_version" tr -d '[:space:]')
if [ -f "$path_to_tmc"/tmc-langs-cli-x86_64-unknown-linux-gnu-"$tmc_version" ];
then
echo "Found tmc-langs-cli"
else
echo "Downloading tmc-langs-cli"
path_to_downloader=$(relativize_path "./download-tmc-langs")
run_command "$path_to_downloader"
fi
}
2 changes: 1 addition & 1 deletion bin/sqlx-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ run_command cd "$RELATIVE_PATH" || exit
run_command cargo sqlx prepare --database-url postgres://headless-lms@localhost:54328/headless_lms_dev -- "$@" --lib

# Formatting the result file so that diffs are pretty
run_command npx prettier --write sqlx-data.json
run_command npx prettier --write .sqlx
1 change: 1 addition & 0 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ensure_program_in_path "minikube"
ensure_program_in_path "kustomize"
check_minikube_version
ensure_common_programs_in_path
ensure_tmc_langs_cli_downloaded

run_command npm run postinstall
echo ""
Expand Down
6 changes: 6 additions & 0 deletions kubernetes/test/patch-with-init-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
path: "/spec/template/spec/containers/0/resources/limits/cpu"
- op: remove
path: "/spec/template/spec/containers/0/resources/limits/memory"
- op: add
path: "/spec/template/spec/hostAliases"
value:
- ip: "10.96.3.99"
hostnames:
- "project-331.local"
6 changes: 6 additions & 0 deletions kubernetes/test/patch-without-init-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
path: "/spec/template/spec/containers/0/resources/limits/cpu"
- op: remove
path: "/spec/template/spec/containers/0/resources/limits/memory"
- op: add
path: "/spec/template/spec/hostAliases"
value:
- ip: "10.96.3.99"
hostnames:
- "project-331.local"
Loading

0 comments on commit 91c6848

Please sign in to comment.