Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2a5d95a
Merge tag 'v0.1.1' into develop
oriolsastre Jul 13, 2023
d0a8c8f
Testejar classe JwtHandler
oriolsastre Jul 16, 2023
980a631
Testejar classes Error i Env
oriolsastre Jul 16, 2023
f99d06e
Merge pull request #25 from oriolsastre/feature/3-testejar-classe-jwt…
oriolsastre Jul 16, 2023
41e095b
Testejar classe Database
oriolsastre Jul 17, 2023
157d4ae
Merge pull request #27 from oriolsastre/feature/26-testejar-classe-da…
oriolsastre Jul 17, 2023
65bdada
Construir i sembrar la base de dades
oriolsastre Jul 21, 2023
174070c
Redesign strucure. Monolotic app
oriolsastre Jul 19, 2024
05437ed
Merge pull request #30 from oriolsastre/init-php
oriolsastre Jul 19, 2024
76a31c9
Testejar classe Control
oriolsastre Jul 22, 2023
ca5b5e6
Redesign strucure. Monolotic app
oriolsastre Jul 19, 2024
4be91b0
Merge branch 'develop' of https://github.com/oriolsastre/PoolNET into…
oriolsastre Jul 21, 2024
aa8a9ea
Configurar tests amb env
oriolsastre Jul 21, 2024
712ef52
Model(test): constructor i connect
oriolsastre Jul 21, 2024
285a5fa
Merge pull request #29 from oriolsastre/feature/28-testejar-classe-model
oriolsastre Jul 21, 2024
e8d1042
Moure Controlador i JwtHandler a serveis (#33)
oriolsastre Jul 26, 2024
ad08f1c
Iniciar i testejar Router
oriolsastre Jul 30, 2024
cde579d
Pagina principal, mig testejat
oriolsastre Aug 3, 2024
fa987d1
Merge pull request #34 from oriolsastre/31-crear-pàgina-principal
oriolsastre Aug 3, 2024
611acfb
Add Request class
oriolsastre Aug 5, 2024
dd66879
Merge pull request #35 from oriolsastre/req_res
oriolsastre Aug 5, 2024
0a6f6fc
Afegir Req, Res (#36)
oriolsastre Aug 9, 2024
3e05a0b
Endpoint de login amb MW
oriolsastre Aug 12, 2024
12e315e
Afegir tests
oriolsastre Aug 12, 2024
5f5fea4
Merge pull request #37 from oriolsastre/login
oriolsastre Aug 12, 2024
91fa697
Mes tests
oriolsastre Aug 12, 2024
16d3d58
Tests i Interfaces
oriolsastre Aug 18, 2025
00f4761
Migrate to Sqlite
oriolsastre Aug 19, 2025
034c7b1
Tests i moltes coses sense ordre
oriolsastre Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions .github/workflows/back-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
name: Backend on Pull Request
name: On Pull Request
on:
pull_request:
branches:
- main
- develop
paths: "back/**"
paths: "src/**"
types: [opened, synchronize, reopened]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
DB_DATABASE: PoolNET
DB_USER: root
DB_PASSWORD: root

steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build and seed database
run: |
cd ${{ github.workspace }}/src/config/database
sqlite3 ${{ env.DB_DATABASE }}.db < database.sql
sqlite3 ${{ env.DB_DATABASE }}.db < db_seed_test.sql
- name: Rename env-example to env
run: |
cd ${{ github.workspace }}/src/config
mv env-example.php Env.php
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
coverage: xdebug
- name: Install dependencies with composer
- name: Install dependencies with composer and run autoload
run: |
cd ${{ github.workspace }}/back
cd ${{ github.workspace }}/src
composer update --no-ansi --no-interaction --no-progress
- name: Rename env-example to env
run: |
cd ${{ github.workspace }}/back/config
mv env-example.php Env.php
cd ${{ github.workspace }}/back
composer dump-autoload
cd ${{ github.workspace }}/src
composer dump-autoload -o
- name: Run tests with phpunit/phpunit
run: |
cd ${{ github.workspace }}/back
cd ${{ github.workspace }}/src
vendor/bin/phpunit __tests__ --coverage-clover=coverage.xml --log-junit=execution.xml
# - name: Fix code coverage paths
# run: |
# sed -i 's@'$GITHUB_WORKSPACE'@/home/runner/work/PoolNET/PoolNET@g' ${{ github.workspace }}/back/coverage.xml
# sed -i 's@'$GITHUB_WORKSPACE'@/home/runner/work/PoolNET/PoolNET@g' ${{ github.workspace }}/back/execution.xml
# sed -i 's@'$GITHUB_WORKSPACE'@/home/runner/work/PoolNET/PoolNET@g' ${{ github.workspace }}/src/coverage.xml
# sed -i 's@'$GITHUB_WORKSPACE'@/home/runner/work/PoolNET/PoolNET@g' ${{ github.workspace }}/src/execution.xml
- name: See coverage
run: |
cd ${{ github.workspace }}/back
cd ${{ github.workspace }}/src
cat coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
13 changes: 9 additions & 4 deletions back/.gitignore → .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
composer.phar
/vendor/
/src/vendor/

node_modules
.vscode
.phpunit.cache
.coverage

# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock

/config/env.php
/config/env-sastre.php
/__tests__/E2E/constants.ts
.htaccess
/src/config/env.php
/src/config/env-sastre.php
/src/config/database/PoolNET.db
/src/config/database/db_seed_prod*
/src/config/database/db_init_local.sh
/src/__tests__/E2E/constants.ts
8 changes: 8 additions & 0 deletions .htaccess.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
RewriteEngine On
RewriteBase /PoolNET/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^(css|img)

RewriteRule ^(.*)$ index.php [QSA,L]
14 changes: 0 additions & 14 deletions back/__tests__/models/JwtHandlerTest.php

This file was deleted.

16 changes: 0 additions & 16 deletions back/composer.json

This file was deleted.

43 changes: 0 additions & 43 deletions back/config/Database.php

This file was deleted.

62 changes: 0 additions & 62 deletions back/controllers/Controlador.php

This file was deleted.

104 changes: 0 additions & 104 deletions back/controllers/control.php

This file was deleted.

Loading