mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-07 08:00:15 +02:00
Compare commits
8 Commits
0.0.20
..
b02af503c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
b02af503c5
|
|||
|
3c878d126f
|
|||
|
0aeb943aa2
|
|||
|
0c95b22fa7
|
|||
|
246ff999d3
|
|||
|
cab2d25000
|
|||
|
3980d03bad
|
|||
|
e9b2b8c344
|
@@ -15,15 +15,12 @@ concurrency:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
checks: write
|
|
||||||
pull-requests: write
|
|
||||||
contents: read
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -52,9 +49,9 @@ jobs:
|
|||||||
- name: Twig Coding Style
|
- name: Twig Coding Style
|
||||||
run: docker compose exec -T php vendor/bin/twig-cs-fixer check
|
run: docker compose exec -T php vendor/bin/twig-cs-fixer check
|
||||||
- name: Static Analysis (PHPStan)
|
- name: Static Analysis (PHPStan)
|
||||||
run: docker compose exec -T php vendor/bin/phpstan analyse --no-progress --no-ansi --error-format=github
|
run: docker compose exec -T php vendor/bin/phpstan analyse --no-progress --no-ansi
|
||||||
- name: Rector
|
- name: Rector
|
||||||
run: docker compose exec -T php vendor/bin/rector process --dry-run --no-progress-bar --output-format=github
|
run: docker compose exec -T php vendor/bin/rector process --dry-run
|
||||||
- name: Check HTTP reachability
|
- name: Check HTTP reachability
|
||||||
run: curl -v --fail-with-body http://localhost
|
run: curl -v --fail-with-body http://localhost
|
||||||
- name: Check Mercure reachability
|
- name: Check Mercure reachability
|
||||||
@@ -67,21 +64,12 @@ jobs:
|
|||||||
- name: Load fixtures
|
- name: Load fixtures
|
||||||
run: docker compose exec -T php bin/console -e test doctrine:fixtures:load --no-interaction --group=test
|
run: docker compose exec -T php bin/console -e test doctrine:fixtures:load --no-interaction --group=test
|
||||||
- name: Run PHPUnit
|
- name: Run PHPUnit
|
||||||
run: docker compose exec -T php vendor/bin/phpunit --log-junit var/phpunit/junit.xml
|
run: docker compose exec -T php vendor/bin/phpunit
|
||||||
- name: Publish PHPUnit test results
|
|
||||||
if: always()
|
|
||||||
uses: mikepenz/action-junit-report@v5
|
|
||||||
with:
|
|
||||||
report_paths: var/phpunit/junit.xml
|
|
||||||
check_name: PHPUnit
|
|
||||||
- name: Doctrine Schema Validator
|
- name: Doctrine Schema Validator
|
||||||
run: docker compose exec -T php bin/console -e test doctrine:schema:validate
|
run: docker compose exec -T php bin/console -e test doctrine:schema:validate
|
||||||
|
|
||||||
build-deploy:
|
build-deploy:
|
||||||
name: Build and deploy to ${{ startsWith(github.ref, 'refs/tags/') && 'production' || (github.ref == 'refs/heads/main' && 'acceptance' || '') }}
|
name: Build and deploy to ${{ startsWith(github.ref, 'refs/tags/') && 'production' || (github.ref == 'refs/heads/main' && 'acceptance' || '') }}
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
environment:
|
environment:
|
||||||
name: ${{ startsWith(github.ref, 'refs/tags/') && 'production' || (github.ref == 'refs/heads/main' && 'acceptance' || '') }}
|
name: ${{ startsWith(github.ref, 'refs/tags/') && 'production' || (github.ref == 'refs/heads/main' && 'acceptance' || '') }}
|
||||||
url: ${{ vars.URL }}
|
url: ${{ vars.URL }}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ services:
|
|||||||
image: axllent/mailpit
|
image: axllent/mailpit
|
||||||
ports:
|
ports:
|
||||||
- "1025"
|
- "1025"
|
||||||
- "8025:8025"
|
- "8025"
|
||||||
environment:
|
environment:
|
||||||
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||||
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
symfonycasts_verify_email:
|
|
||||||
lifetime: 604800 # 1 week in seconds
|
|
||||||
@@ -117,12 +117,6 @@ final class QuizController extends AbstractController
|
|||||||
return $this->redirectToRoute('tvdt_quiz_quiz_page', ['seasonCode' => $season->seasonCode, 'nameHash' => $nameHash]);
|
return $this->redirectToRoute('tvdt_quiz_quiz_page', ['seasonCode' => $season->seasonCode, 'nameHash' => $nameHash]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($answer->question !== $this->questionRepository->findNextQuestionForCandidate($candidate)) {
|
|
||||||
$this->addFlash(FlashType::Danger, $this->translator->trans('You cannot answer this question'));
|
|
||||||
|
|
||||||
return $this->redirectToRoute('tvdt_quiz_quiz_page', ['seasonCode' => $season->seasonCode, 'nameHash' => $nameHash]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$givenAnswer = new GivenAnswer($candidate, $answer->question->quiz, $answer);
|
$givenAnswer = new GivenAnswer($candidate, $answer->question->quiz, $answer);
|
||||||
$this->entityManager->persist($givenAnswer);
|
$this->entityManager->persist($givenAnswer);
|
||||||
$this->entityManager->flush();
|
$this->entityManager->flush();
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ use Tvdt\Entity\Candidate;
|
|||||||
use Tvdt\Entity\Question;
|
use Tvdt\Entity\Question;
|
||||||
use Tvdt\Entity\Quiz;
|
use Tvdt\Entity\Quiz;
|
||||||
use Tvdt\Entity\Season;
|
use Tvdt\Entity\Season;
|
||||||
use Tvdt\Entity\SeasonSettings;
|
|
||||||
|
|
||||||
final class KrtekFixtures extends Fixture implements FixtureGroupInterface
|
final class KrtekFixtures extends Fixture implements FixtureGroupInterface
|
||||||
{
|
{
|
||||||
@@ -49,11 +48,6 @@ final class KrtekFixtures extends Fixture implements FixtureGroupInterface
|
|||||||
$season->activeQuiz = $quiz1;
|
$season->activeQuiz = $quiz1;
|
||||||
$season->addQuiz($this->createQuiz2($season));
|
$season->addQuiz($this->createQuiz2($season));
|
||||||
|
|
||||||
\assert($season->settings instanceof SeasonSettings);
|
|
||||||
|
|
||||||
$season->settings->confirmAnswers = true;
|
|
||||||
$season->settings->showNumbers = true;
|
|
||||||
|
|
||||||
$manager->flush();
|
$manager->flush();
|
||||||
|
|
||||||
$this->addReference(self::KRTEK_SEASON, $season);
|
$this->addReference(self::KRTEK_SEASON, $season);
|
||||||
|
|||||||
@@ -433,10 +433,6 @@
|
|||||||
<source>You are not allowed to answer this quiz</source>
|
<source>You are not allowed to answer this quiz</source>
|
||||||
<target>Je mag deze test niet beantwoorden</target>
|
<target>Je mag deze test niet beantwoorden</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="78moQnF" resname="You cannot answer this question">
|
|
||||||
<source>You cannot answer this question</source>
|
|
||||||
<target>Je kan deze vraag niet beantwoorden</target>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="0afY1NF" resname="You have no seasons yet.">
|
<trans-unit id="0afY1NF" resname="You have no seasons yet.">
|
||||||
<source>You have no seasons yet.</source>
|
<source>You have no seasons yet.</source>
|
||||||
<target>Je hebt nog geen seizoenen.</target>
|
<target>Je hebt nog geen seizoenen.</target>
|
||||||
|
|||||||
Reference in New Issue
Block a user