@@ -27,29 +27,29 @@ jobs:
2727 - docker build -t docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest . -f backend.Dockerfile
2828 # push image
2929 - docker push docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest
30- # - stage: test
31- # before_script:
32- # - node --version
33- # - npm --version
34- # - npm install -g newman
35- # - newman --version
36- # script:
37- # # login to github registry
38- # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker.pkg.github.com
39- # # pull images
40- # - docker pull docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest
41- # # decrypt the env file
42- # - openssl aes-256-cbc -K $encrypted_3c84dcdc6bbe_key -iv $encrypted_3c84dcdc6bbe_iv -in .env.enc -out .env -d
43- # # Run the backend api
44- # - docker run -d -p 5000:5000 --restart always --env-file .env docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest
45- # # Wait for docker to be up
46- # - sleep 10
47- # # run newman tests
48- # - newman run --color on 'PyMatcha.postman_collection.json'
49- # after_script:
50- # # stop and remove docker to prevent them from block port at next iteration/test
51- # - docker stop $(docker ps -a -q)
52- # - docker rm $(docker ps -a -q)
30+ - stage : test
31+ before_script :
32+ - node --version
33+ - npm --version
34+ - npm install -g newman
35+ - newman --version
36+ script :
37+ # login to github registry
38+ - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker.pkg.github.com
39+ # pull images
40+ - docker pull docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest
41+ # decrypt the env file
42+ - openssl aes-256-cbc -K $encrypted_3c84dcdc6bbe_key -iv $encrypted_3c84dcdc6bbe_iv -in .env.enc -out .env -d
43+ # Run the backend api
44+ - docker run -d -p 5000:5000 --restart always --env-file .env docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest
45+ # Wait for docker to be up
46+ - sleep 10
47+ # run newman tests
48+ - newman run --color on 'PyMatcha.postman_collection.json'
49+ after_script :
50+ # stop and remove docker to prevent them from block port at next iteration/test
51+ - docker stop $(docker ps -a -q)
52+ - docker rm $(docker ps -a -q)
5353 - stage : lint
5454 before_script :
5555 - pip install -r backend/requirements.txt
0 commit comments