Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
julienhouyet committed Mar 15, 2024
2 parents 6623cb1 + 89266e6 commit 926a414
Show file tree
Hide file tree
Showing 53 changed files with 611,223 additions and 810 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ APP_SECRET=fake_app_secret
###< symfony/framework-bundle ###

###> MySQL Database ###
SERVER_IP=0.0.0.0
MYSQL_HOST=mysql
MYSQL_DATABASE=pokemonapi
MYSQL_USER=poke_admin
Expand Down
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

###> MySQL Database ###
SERVER_IP=0.0.0.0
MYSQL_HOST=mysql
MYSQL_DATABASE=pokemonapi
MYSQL_USER=root
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to Prod

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Deploy to Staging Server
run: |
ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << EOF
cd /var/www/api.pokedexia.com
git pull origin main
docker compose -f docker/prod/docker-compose.yml down
docker compose -f docker/prod/docker-compose.yml build --no-cache
docker compose -f docker/prod/docker-compose.yml up -d
EOF
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ yarn-error.log
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

/docker/prod/.env
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# [0.7.0](https://github.com/julienhouyet/Symfony-Pokemon-API/compare/v0.3.0...v0.7.0) (2024-03-15)


### Bug Fixes

* add move:read in type ([5c83f08](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/5c83f08ee8cc2b029056a7191f12af9740f7ae74))
* api move uri ([72df2b6](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/72df2b65c042974e8ce2366571101fdee65ff752))
* docker prod adjustement ([362615a](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/362615a69f7bd4c2285b6897b93bbc2d5c1b8b1d))
* docker prod composer ([efba72a](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/efba72a1f8d7a33325375b23fb0d87d12ab32b8c))
* error 500 if i post a pokemon with a missing element ([61f0031](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/61f00318866d98339c4f0e21286219830cab8a90))
* second try docker prod ([b9acbd7](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/b9acbd7a043e8db1d3481de3691f0b4ea2a95937))


### Features

* add filter on entities ([5a11130](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/5a111306dbc4fc13bbd3243573b5ba73606390ac))
* add fixture-reset command ([14a9aff](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/14a9affadeabc3e1605051cfc0f23c331d9e5d04))
* add Move test ([3d2326c](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/3d2326c34194f47e4ab9d2da63d5c095becb3d79))
* add Pokemon stats support ([76376ab](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/76376ab888ea17e1f032a29e38ed40a3d21ffb4e))
* add tests for Stats ([a373a4c](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/a373a4c6d74ceda3b6a3e3a3b724dde6027cebb1))
* add worflow for ci/cd ([de244da](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/de244daebe8ab68638023ce5cb684b4f232431cb))
* automatic token deletion when user is deleted ([75e763f](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/75e763f13bc1df49d60c6aba2db1126256512f96))
* better Pokemon Type structure ([ca3a4de](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/ca3a4de5041a0355f5e2c1639dd945a5f6a49ef5))
* create admin when import pokemon data ([773e3f1](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/773e3f1fddad33c939599a5ee5e5620622c48239))
* create Moves Pokemon & fixture & factory ([893ab6c](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/893ab6c649ea7f5f087f116895c2bf7422c6e1c9))
* create Pokemon import ([d787a10](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/d787a10ec1aacda66158b46d108494c11b36f18d))
* create Pokemon Moves import ([2025a2e](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/2025a2e4ccad43f7ff655460c8c91976db4a6b7e))
* create Pokemon permissions tests ([3a87476](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/3a8747690c59a3b2a0a0301a3b6834b00f933ecc))
* create PokemonTypes & PokemonStats import ([f7cc677](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/f7cc6775539ef2fcf03a1c0db46e156f155b2f6a))
* create Stat permissions tests ([c75f67d](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/c75f67d75e5dc0d521fef99944d3926fabadedb1))
* create Type & Stats import ([a24d555](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/a24d5555ef5906abf807a8d7c1b39cda62644c4b))
* create Type permissions tests ([2897308](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/2897308405b683e2f8793d8478cb55ffe3e4e150))
* create user permission test ([7bfb1ff](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/7bfb1ff9d12b978af70322dd6b55eef45ade074f))
* create UserHashPasswordStateProcessor ([add9a36](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/add9a36dcc3008e6c9eac130a6371827bf12a589))
* finish docker prod ([267e14b](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/267e14bf460779d75c10bfe1f9596379317ceb10))
* first try docker prod ([e8a4e0e](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/e8a4e0e856e0881022bf9d0fb6d198b4c21419ca))
* update .env.local & .env.test.local with make command ([c5b6df1](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/c5b6df1ae6651f3ec3ea3b361cc67350332aaea8))
* update access permissions for Users, Pokemons & Types ([cc133c9](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/cc133c99b6e6db3ac3179efad77e2d234968bb4c))
* update Pokemon permissions tests ([777768e](https://github.com/julienhouyet/Symfony-Pokemon-API/commit/777768e43dfb1076af2a66c334d235b0a465cc16))



# 0.6.0 (2024-03-11)


Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ YELLOW=\033[0;33m
BLUE=\033[0;34m
NC=\033[0m

VERSION=0.6.0
VERSION=0.7.0
LATEST_VERSION = $(shell curl -s "https://api.github.com/repos/julienhouyet/Symfony-Pokemon-API/releases?per_page=1" | grep tag_name | sed 's/.*: "\(.*\)",/\1/' | sed 's/v//')

help:
Expand All @@ -31,7 +31,7 @@ rebuild:
symfony php bin/console cache:clear
@echo "${YELLOW}Installing dependencies...${NC}"
composer install
npm install
yarn install
@echo "${YELLOW}Building and starting containers...${NC}"
docker-compose -f docker/dev/docker-compose.yml up --build -d
@echo "${YELLOW}Watching for changes...${NC}"
Expand All @@ -40,7 +40,7 @@ rebuild:
setup:
@echo "${YELLOW}Installing dependencies...${NC}"
composer install
npm install
yarn install
@echo "${YELLOW}Building and starting containers...${NC}"
docker-compose -f docker/dev/docker-compose.yml build
@echo "\n\nInstallation complete, run ${GREEN}make start${NC} to launch the project.\n"
Expand All @@ -63,6 +63,20 @@ fixture:
@echo "${YELLOW}Loading fixtures...${NC}"
docker exec -it symfony-pokemon-api-php-1 php bin/console doctrine:fixtures:load

import:
@echo "${YELLOW}Reset database & import pokemon data...${NC}"
docker exec -it symfony-pokemon-api-php-1 php bin/console doctrine:database:drop --force
docker exec -it symfony-pokemon-api-php-1 php bin/console doctrine:database:create
docker exec -it symfony-pokemon-api-php-1 php bin/console doctrine:schema:create
docker exec -it symfony-pokemon-api-php-1 php bin/console import:users
docker exec -it symfony-pokemon-api-php-1 php bin/console import:types
docker exec -it symfony-pokemon-api-php-1 php bin/console import:stats
docker exec -it symfony-pokemon-api-php-1 php bin/console import:moves
docker exec -it symfony-pokemon-api-php-1 php bin/console import:pokemons
docker exec -it symfony-pokemon-api-php-1 php bin/console import:pokemon-types
docker exec -it symfony-pokemon-api-php-1 php bin/console import:pokemon-stats
docker exec -it symfony-pokemon-api-php-1 php bin/console import:pokemon-moves

migration:
@echo "${YELLOW}Prepare migration...${NC}"
docker exec -it symfony-pokemon-api-php-1 php bin/console make:migration
Expand All @@ -75,4 +89,4 @@ test:
@echo "${YELLOW}Running PHPUnit tests...${NC}"
docker exec -it symfony-pokemon-api-php-1 php bin/phpunit

.PHONY: help rebuild setup start stop test fixture migrate migration
.PHONY: help rebuild setup start stop test fixture import migrate migration
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Symfony-Pokemon-API

<p align="center">
<img src="https://img.shields.io/badge/version-0.6.0-blue.svg">
<img src="https://img.shields.io/badge/version-0.7.0-blue.svg">
</p>

# Introduction
Expand Down
166 changes: 166 additions & 0 deletions assets/csv/moves.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
id;identifier;type_id;power;pp;accuracy;priority
1;pound;1;40;35;100;0
2;karate-chop;2;50;25;100;0
3;double-slap;1;15;10;85;0
4;comet-punch;1;18;15;85;0
5;mega-punch;1;80;20;85;0
6;pay-day;1;40;20;100;0
7;fire-punch;10;75;15;100;0
8;ice-punch;15;75;15;100;0
9;thunder-punch;13;75;15;100;0
10;scratch;1;40;35;100;0
11;vice-grip;1;55;30;100;0
12;guillotine;1;;5;30;0
13;razor-wind;1;80;10;100;0
14;swords-dance;1;;20;;0
15;cut;1;50;30;95;0
16;gust;3;40;35;100;0
17;wing-attack;3;60;35;100;0
18;whirlwind;1;;20;;-6
19;fly;3;90;15;95;0
20;bind;1;15;20;85;0
21;slam;1;80;20;75;0
22;vine-whip;12;45;25;100;0
23;stomp;1;65;20;100;0
24;double-kick;2;30;30;100;0
25;mega-kick;1;120;5;75;0
26;jump-kick;2;100;10;95;0
27;rolling-kick;2;60;15;85;0
28;sand-attack;5;;15;100;0
29;headbutt;1;70;15;100;0
30;horn-attack;1;65;25;100;0
31;fury-attack;1;15;20;85;0
32;horn-drill;1;;5;30;0
33;tackle;1;40;35;100;0
34;body-slam;1;85;15;100;0
35;wrap;1;15;20;90;0
36;take-down;1;90;20;85;0
37;thrash;1;120;10;100;0
38;double-edge;1;120;15;100;0
39;tail-whip;1;;30;100;0
40;poison-sting;4;15;35;100;0
41;twineedle;7;25;20;100;0
42;pin-missile;7;25;20;95;0
43;leer;1;;30;100;0
44;bite;17;60;25;100;0
45;growl;1;;40;100;0
46;roar;1;;20;;-6
47;sing;1;;15;55;0
48;supersonic;1;;20;55;0
49;sonic-boom;1;;20;90;0
50;disable;1;;20;100;0
51;acid;4;40;30;100;0
52;ember;10;40;25;100;0
53;flamethrower;10;90;15;100;0
54;mist;15;;30;;0
55;water-gun;11;40;25;100;0
56;hydro-pump;11;110;5;80;0
57;surf;11;90;15;100;0
58;ice-beam;15;90;10;100;0
59;blizzard;15;110;5;70;0
60;psybeam;14;65;20;100;0
61;bubble-beam;11;65;20;100;0
62;aurora-beam;15;65;20;100;0
63;hyper-beam;1;150;5;90;0
64;peck;3;35;35;100;0
65;drill-peck;3;80;20;100;0
66;submission;2;80;20;80;0
67;low-kick;2;;20;100;0
68;counter;2;;20;100;-5
69;seismic-toss;2;;20;100;0
70;strength;1;80;15;100;0
71;absorb;12;20;25;100;0
72;mega-drain;12;40;15;100;0
73;leech-seed;12;;10;90;0
74;growth;1;;20;;0
75;razor-leaf;12;55;25;95;0
76;solar-beam;12;120;10;100;0
77;poison-powder;4;;35;75;0
78;stun-spore;12;;30;75;0
79;sleep-powder;12;;15;75;0
80;petal-dance;12;120;10;100;0
81;string-shot;7;;40;95;0
82;dragon-rage;16;;10;100;0
83;fire-spin;10;35;15;85;0
84;thunder-shock;13;40;30;100;0
85;thunderbolt;13;90;15;100;0
86;thunder-wave;13;;20;90;0
87;thunder;13;110;10;70;0
88;rock-throw;6;50;15;90;0
89;earthquake;5;100;10;100;0
90;fissure;5;;5;30;0
91;dig;5;80;10;100;0
92;toxic;4;;10;90;0
93;confusion;14;50;25;100;0
94;psychic;14;90;10;100;0
95;hypnosis;14;;20;60;0
96;meditate;14;;40;;0
97;agility;14;;30;;0
98;quick-attack;1;40;30;100;1
99;rage;1;20;20;100;0
100;teleport;14;;20;;-6
101;night-shade;8;;15;100;0
102;mimic;1;;10;;0
103;screech;1;;40;85;0
104;double-team;1;;15;;0
105;recover;1;;5;;0
106;harden;1;;30;;0
107;minimize;1;;10;;0
108;smokescreen;1;;20;100;0
109;confuse-ray;8;;10;100;0
110;withdraw;11;;40;;0
111;defense-curl;1;;40;;0
112;barrier;14;;20;;0
113;light-screen;14;;30;;0
114;haze;15;;30;;0
115;reflect;14;;20;;0
116;focus-energy;1;;30;;0
117;bide;1;;10;;1
118;metronome;1;;10;;0
119;mirror-move;3;;20;;0
120;self-destruct;1;200;5;100;0
121;egg-bomb;1;100;10;75;0
122;lick;8;30;30;100;0
123;smog;4;30;20;70;0
124;sludge;4;65;20;100;0
125;bone-club;5;65;20;85;0
126;fire-blast;10;110;5;85;0
127;waterfall;11;80;15;100;0
128;clamp;11;35;15;85;0
129;swift;1;60;20;;0
130;skull-bash;1;130;10;100;0
131;spike-cannon;1;20;15;100;0
132;constrict;1;10;35;100;0
133;amnesia;14;;20;;0
134;kinesis;14;;15;80;0
135;soft-boiled;1;;5;;0
136;high-jump-kick;2;130;10;90;0
137;glare;1;;30;100;0
138;dream-eater;14;100;15;100;0
139;poison-gas;4;;40;90;0
140;barrage;1;15;20;85;0
141;leech-life;7;80;10;100;0
142;lovely-kiss;1;;10;75;0
143;sky-attack;3;140;5;90;0
144;transform;1;;10;;0
145;bubble;11;40;30;100;0
146;dizzy-punch;1;70;10;100;0
147;spore;12;;15;100;0
148;flash;1;;20;100;0
149;psywave;14;;15;100;0
150;splash;1;;40;;0
151;acid-armor;4;;20;;0
152;crabhammer;11;100;10;90;0
153;explosion;1;250;5;100;0
154;fury-swipes;1;18;15;80;0
155;bonemerang;5;50;10;90;0
156;rest;14;;5;;0
157;rock-slide;6;75;10;90;0
158;hyper-fang;1;80;15;90;0
159;sharpen;1;;30;;0
160;conversion;1;;30;;0
161;tri-attack;1;80;10;100;0
162;super-fang;1;;10;90;0
163;slash;1;70;20;100;0
164;substitute;1;;10;;0
165;struggle;1;50;1;;0
Loading

0 comments on commit 926a414

Please sign in to comment.