diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03fa504..8f143ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,6 @@ name: CI Pipeline Hanoi Towers on: - push: - branches: - - master pull_request: types: [opened, synchronize, reopened] @@ -18,7 +15,7 @@ jobs: HANOI_FRONTEND_URL: ${{ vars.HANOI_FRONTEND_URL }} HANOI_BACKEND_URL: ${{ vars.HANOI_BACKEND_URL }} steps: - - name: Checkout + - name: Checkout Repository uses: actions/checkout@v4.1.7 - name: Set up .env files run: | @@ -52,14 +49,19 @@ jobs: - name: Install needed Chrome Version run: npm install -g chromedriver@125 - name: Run Axe with set Chromedriver path - run: axe http://localhost:8080, http://localhost:8080/game, http://localhost:8080/cheat, http://localhost:8080/solver --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit + continue-on-error: true + run: axe http://localhost:8080, http://localhost:8080/game, http://localhost:8080/cheat, http://localhost:8080/solver --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit >> results - name: Comment on PR if: ${{ github.event_name == 'pull_request' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: JoseThen/comment-pr@v1.2.0 + with: + file_path: './results' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Fail if results file exists run: | - pr_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") - curl -s -H "Authorization: token $GITHUB_TOKEN" \ - -X POST \ - -d "{\"body\": \"Thank you for your contribution! We are reviewing your pull request.\"}" \ - "https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/comments" + if [ -f "./results" ]; then + echo "Results file with accessibility issues exists - Details in PR-comment. Failing the workflow." + exit 1 + else + echo "No errors, be sure to still check manually for accessibility ;)" + fi diff --git a/.gitignore b/.gitignore index 04a7ad2..ff91780 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.iml build kotlin-js-store +results diff --git a/hanoi-frontend/src/jsMain/kotlin/lib/compose/modal/modal.kt b/hanoi-frontend/src/jsMain/kotlin/lib/compose/modal/modal.kt index baf2635..7a47076 100644 --- a/hanoi-frontend/src/jsMain/kotlin/lib/compose/modal/modal.kt +++ b/hanoi-frontend/src/jsMain/kotlin/lib/compose/modal/modal.kt @@ -32,7 +32,7 @@ fun ModalLayer( flexDirection(FlexDirection.Column) height(100.vh) backgroundColor(Color.black) - opacity(0.5) + opacity(1) if(bottomUp) { justifyContent(JustifyContent.FlexEnd) } @@ -148,4 +148,4 @@ fun Modal( } } } -} \ No newline at end of file +}