Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod #77

Closed
wants to merge 85 commits into from
Closed

Prod #77

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
bab366a
Update prod_kolekto.yml
Luiz-Edu0202 Oct 30, 2023
6ea3c6a
Merge branch 'prod'
Luiz-Edu0202 Oct 30, 2023
f1b1843
Update prod_kolekto.yml
Luiz-Edu0202 Oct 30, 2023
2222f47
Update prod_kolekto.yml
Luiz-Edu0202 Oct 30, 2023
f81fd5d
Update prod_kolekto.yml
Luiz-Edu0202 Oct 30, 2023
0203e1a
Update prod_kolekto.yml
Luiz-Edu0202 Oct 30, 2023
445e12c
Update prod_kolekto.yml
Luiz-Edu0202 Oct 30, 2023
a0388af
Merge pull request #52 from P-E-N-T-E-S/main
Thomazrlima Oct 30, 2023
938767a
Merge pull request #53 from P-E-N-T-E-S/main
Thomazrlima Oct 30, 2023
e6988bf
Merge pull request #54 from P-E-N-T-E-S/main
Thomazrlima Oct 30, 2023
515f446
Create .env
evaldocunhaf Oct 30, 2023
5b27352
Update prod_kolekto.yml
evaldocunhaf Oct 31, 2023
6f4b078
Update prod_kolekto.yml
evaldocunhaf Oct 31, 2023
f86d471
Merge pull request #55 from P-E-N-T-E-S/main
Luiz-Edu0202 Oct 31, 2023
f96021d
Merge pull request #56 from P-E-N-T-E-S/main
Luiz-Edu0202 Oct 31, 2023
df74ffe
Delete .github directory
evaldocunhaf Nov 3, 2023
81c3c64
Add or update the Azure App Service build and deployment workflow config
evaldocunhaf Nov 3, 2023
72de440
Update prod_kolekto2.yml
evaldocunhaf Nov 3, 2023
0c543eb
Update prod_kolekto2.yml
evaldocunhaf Nov 3, 2023
e7c633c
implementação dos testes tent1
evaldocunhaf Nov 25, 2023
8a99ffe
testes na build tent2
evaldocunhaf Nov 25, 2023
17d9005
testes na build tent3
evaldocunhaf Nov 25, 2023
b32dde1
testes na build tent4
evaldocunhaf Nov 25, 2023
6ecf97e
Update settings.py para deploy
evaldocunhaf Nov 25, 2023
5e45404
Update settings.py para deploy v2
evaldocunhaf Nov 25, 2023
dd383a3
testes na build de deployment tent5
evaldocunhaf Nov 25, 2023
0a6a6cf
Merge pull request #66 from P-E-N-T-E-S/main
Thomazrlima Nov 26, 2023
fefafce
Update prod_kolekto2.yml
evaldocunhaf Nov 26, 2023
666953e
Update prod_kolekto2.yml
evaldocunhaf Nov 26, 2023
b6d2481
Merge pull request #67 from P-E-N-T-E-S/main
Thomazrlima Nov 26, 2023
1e71c09
Merge pull request #68 from P-E-N-T-E-S/main
Luiz-Edu0202 Nov 26, 2023
c1c4f26
resolver problema dos teste no deploy
Luiz-Edu0202 Nov 26, 2023
8efbedf
Update prod_kolekto2.yml
Luiz-Edu0202 Nov 26, 2023
f4ce6ab
esperança
evaldocunhaf Nov 26, 2023
0e41f19
Delete PKolekto/Kolekto/tests/chromedriver.exe
Luiz-Edu0202 Nov 26, 2023
152965d
Merge pull request #69 from P-E-N-T-E-S/main
evaldocunhaf Nov 26, 2023
6f6c469
Update prod_kolekto2.yml
evaldocunhaf Nov 26, 2023
659baa6
Update prod_kolekto2.yml
evaldocunhaf Nov 26, 2023
8738e9e
Update teste.py
evaldocunhaf Nov 26, 2023
e7f2a5d
Delete PKolekto/Kolekto/teste.py
evaldocunhaf Nov 26, 2023
a7b3eb9
Update prod_kolekto2.yml
evaldocunhaf Nov 26, 2023
c75b41f
Delete PKolekto/Kolekto/tests/selenium_setup.py
evaldocunhaf Nov 26, 2023
535910a
Merge pull request #70 from P-E-N-T-E-S/main
evaldocunhaf Nov 26, 2023
37e8b4a
ajuste nos testes para deployment
evaldocunhaf Nov 26, 2023
ef6c2bd
Update prod_kolekto2.yml
evaldocunhaf Nov 26, 2023
edecafb
Merge branch 'prod' of https://github.com/P-E-N-T-E-S/Kolekto into prod
evaldocunhaf Nov 26, 2023
655f3ed
ajustes no yaml
evaldocunhaf Nov 26, 2023
aad9c52
Update prod_kolekto2.yml
evaldocunhaf Nov 27, 2023
2b217e6
ajuste nos testes para deploy
evaldocunhaf Nov 27, 2023
8f4d8ed
Merge branch 'prod' of https://github.com/P-E-N-T-E-S/Kolekto into prod
evaldocunhaf Nov 27, 2023
ea34988
ajustes nos testes para deploy
evaldocunhaf Nov 27, 2023
7717ede
ajustes nos testes para funcionar no deploy
evaldocunhaf Nov 27, 2023
376c5f4
Merge pull request #71 from P-E-N-T-E-S/main
Thomazrlima Nov 27, 2023
b6ede27
ajuste nos testes para deployment
evaldocunhaf Nov 27, 2023
509f78c
Merge branch 'prod' of https://github.com/P-E-N-T-E-S/Kolekto into prod
evaldocunhaf Nov 27, 2023
92ed9da
Merge pull request #72 from P-E-N-T-E-S/main
Thomazrlima Nov 27, 2023
9f6874e
Update prod_kolekto2.yml para a Entrega 4
Thomazrlima Nov 27, 2023
3813433
Merge pull request #73 from P-E-N-T-E-S/cypress
evaldocunhaf Apr 15, 2024
9e0cfce
Update prod_kolekto2.yml attempt cypress
evaldocunhaf Apr 15, 2024
b691fc8
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
3aeff1a
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
cc54b21
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
9dc70b7
Update settings.py
evaldocunhaf Apr 15, 2024
fab32e8
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
47d81f1
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
119786d
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
a9a5ca0
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
9102657
Update prod_kolekto2.yml
evaldocunhaf Apr 15, 2024
30d33b4
Update prod_kolekto2.yml
evaldocunhaf Apr 16, 2024
789c79f
Update prod_kolekto2.yml
evaldocunhaf Apr 16, 2024
0f12548
Delete PKolekto/cypress/support/step-definitions/CadastroProduto.cy.js
evaldocunhaf Apr 16, 2024
ae47ed6
Delete PKolekto/cypress/e2e/CriarProduto.feature
evaldocunhaf Apr 16, 2024
b841028
Update prod_kolekto2.yml
evaldocunhaf Apr 16, 2024
c400265
testes em selenium server de testes
evaldocunhaf Apr 29, 2024
c3ee37c
Merge pull request #75 from P-E-N-T-E-S/selenium
evaldocunhaf Apr 29, 2024
cb63ef0
Update prod_kolekto2.yml
evaldocunhaf Apr 29, 2024
51efc45
ajustes de selenium
evaldocunhaf Apr 29, 2024
c315ea3
Merge pull request #76 from P-E-N-T-E-S/selenium
evaldocunhaf Apr 29, 2024
b8e2583
Update prod_kolekto2.yml
evaldocunhaf May 15, 2024
6ed52b9
Update test.py
evaldocunhaf May 15, 2024
cb10929
Update test.py
evaldocunhaf May 15, 2024
22f556f
Update test.py
evaldocunhaf May 15, 2024
70a98ea
Update test.py
evaldocunhaf May 15, 2024
e98fae8
Update test.py
evaldocunhaf May 15, 2024
10b53bc
Update test.py
evaldocunhaf May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
95 changes: 95 additions & 0 deletions .github/workflows/prod_kolekto2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions

name: Build and deploy Python app to Azure Web App - Kolekto2

on:
push:
branches:
- prod
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: '3.11'

- name: Create and start virtual environment
run: |
python -m venv venv
source venv/bin/activate

- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd PKolekto
pip install -r requirements.txt
npm ci
cd ..

- name: Run local server
run: |
cd PKolekto
python manage.py migrate
python manage.py runserver &
sleep 5
python manage.py test

- name: Run local server
run: |
cd PKolekto
python manage.py migrate
python manage.py runserver &
sleep 5
npx cypress run

- name: Cleaning testing files
run: |
cd PKolekto/
rm .env
rm db.sqlite3
rm cypress.config.js
rm package-lock.json
rm package.json
rm -rf cypress
rm -rf node_modules
cd ..


- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v2
with:
name: python-app
path: |
PKolekto
!venv/

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: python-app


- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: 'Kolekto2'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_021E13B6948147A7BF51AE44491CE929 }}
1 change: 1 addition & 0 deletions PKolekto/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TARGET_ENV=Dev
24 changes: 24 additions & 0 deletions PKolekto/Kolekto/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
import time


chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--disable-browser-side-navigation")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--headless")
chrome_options.add_argument("window-size=1440,1080")
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument("--disable-extensions")

driver = webdriver.Chrome(options=chrome_options)

class Historia1(LiveServerTestCase):

def test_cenario1(self):
driver.get("http://127.0.0.1:8000/registro")
self.assertTrue(True)

1 change: 0 additions & 1 deletion PKolekto/PKolekto/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"django.contrib.staticfiles",
"Kolekto.apps.KolektoConfig",
"whitenoise.runserver_nostatic",
"django_cypress",
]

MIDDLEWARE = [
Expand Down
8 changes: 3 additions & 5 deletions PKolekto/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ const { defineConfig } = require("cypress");

module.exports = defineConfig({
e2e: {
baseUrl: "http://127.0.0.1:8000",
baseUrl: "https://checkpoint-fds.azurewebsites.net/",
viewportWidth: 1920,
viewportHeight: 1080,
watchForFileChanges: false, //reexecuta o cenario ao salvar um arquivo, setando para false
specPattern: "cypress/e2e/**/*.feature",
watchForFileChanges: false,
setupNodeEvents(on, config) {
const cucumber = require("cypress-cucumber-preprocessor").default;
on("file:preprocessor", cucumber());
// implement node event listeners here
},
},
});
24 changes: 0 additions & 24 deletions PKolekto/cypress/e2e/CriarLoja.feature

This file was deleted.

8 changes: 0 additions & 8 deletions PKolekto/cypress/e2e/CriarProduto.feature

This file was deleted.

14 changes: 14 additions & 0 deletions PKolekto/cypress/e2e/login.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
describe('Checkpoint', () => {
it('Criacao de review', () => {
cy.visit('/')
cy.get('[placeholder="Usuário"]').type("jota")
cy.get('[placeholder="Senha"]').type("123")
cy.get('.poppins-semibold').click()
cy.get('input').type("{ENTER}")
cy.get(':nth-child(5) > div > a > h1').click()
//cy.get('#addReview').click()
//cy.get('#texto').type("muito bom o jogo, joguei 3x")
//cy.get('div > form > button').click()
cy.get('.review').invoke('text').should('have.string', 'muito bom o jogo, joguei 3x')
})
})
25 changes: 25 additions & 0 deletions PKolekto/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
7 changes: 0 additions & 7 deletions PKolekto/cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@

// Import commands.js using ES2015 syntax:
import './commands'
require('./pages/home.pages')
require('./pages/login.pages')
require('./pages/cadastro.pages')
require('./pages/minhaLoja.pages')
require('./pages/nova_loja.pages')
require('./pages/editar_loja.pages')
require('./pages/cadasprod.pages')

// Alternatively you can use CommonJS syntax:
// require('./commands')
17 changes: 0 additions & 17 deletions PKolekto/cypress/support/pages/cadasprod.pages.js

This file was deleted.

13 changes: 0 additions & 13 deletions PKolekto/cypress/support/pages/cadastro.pages.js

This file was deleted.

15 changes: 0 additions & 15 deletions PKolekto/cypress/support/pages/editar_loja.pages.js

This file was deleted.

5 changes: 0 additions & 5 deletions PKolekto/cypress/support/pages/home.pages.js

This file was deleted.

13 changes: 0 additions & 13 deletions PKolekto/cypress/support/pages/login.pages.js

This file was deleted.

14 changes: 0 additions & 14 deletions PKolekto/cypress/support/pages/minhaLoja.pages.js

This file was deleted.

24 changes: 0 additions & 24 deletions PKolekto/cypress/support/pages/nova_loja.pages.js

This file was deleted.

15 changes: 0 additions & 15 deletions PKolekto/cypress/support/step-definitions/CadastroProduto.cy.js

This file was deleted.

Loading
Loading