Skip to content

Commit

Permalink
08 criando workflow github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianaSilvaRossi committed Nov 20, 2023
1 parent f53db49 commit d1c611a
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [push]
jobs:
Explore-GitHub-Actions-1:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

Explore-GitHub-Actions-2:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
echo "Listando os arquivos do meu diretorio"
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Passo 01: Instancio uma imagem de SO linux, no caso usei o FEDORA,
# mas pode ser o Ubunto, Alpine, Debian, etc...
# Procure no Docker Hub a imagem que desejar! https://hub.docker.com
FROM fedora:29

# Passo 02: Vou mapear os volumes (diretórios do container) onde deixarei
# os testes (inputs) e os resultados (outputs).
VOLUME /opt/robotframework/results
VOLUME /opt/robotframework/tests

# Passo 03: Vou rodar os comandos que instalam tudo que preciso para rodar o robot
# nesse container linux. Como estou usando o FEDORA, os comandos aqui executados
# devem ser compatíveis com ele!!
RUN dnf upgrade -y && dnf install -y python37

# Passo 04: Instalo o Robot e as libraries que precisarei. No caso abaixo,
# especifiquei a versão do robot que eu quero e não especifiquei a da
# library Faker, com isso ele pegara a mais recente liberada.
# Obs.: As barras são para indicar quebra de linha, mas o comando é um só,
# é como se eu tivesso rodando tudo numa linha só.
RUN pip3 install \
robotframework \
robotframework-faker \
robotframework-requests==0.5.0 \
robotframework-seleniumlibrary \
robotframework-databaselibrary \
robotframework-sshlibrary==3.2.1
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Web test project using the robot framework tool

## INSTALLATION

If you already have Python with pip installed, you can simply run:

```bash
pip install -r .\requirements.txt
```
Expand All @@ -17,7 +19,8 @@ Web test project using the robot framework tool

- tests: Contains test files organized by test type and by page. Within each test file, Page Object classes and keywords defined in resource files are used.

- requirements.txt: File that contains project dependencies and their versions. Installation: pip install -r requirements.txt
- requirements.txt: File that contains project dependencies and their versions. Installation:


## AUTHORS

Expand Down
2 changes: 2 additions & 0 deletions resources/config/chromesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ def get_chromedriver_path():
driver = webdriver.Chrome(service=ChromeService(driver_path))
print(f'Driver name: {driver.name}')

driver.quit

return driver_path
3 changes: 2 additions & 1 deletion resources/config/edgesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ def get_edgedriver_path():

driver = webdriver.Edge(service=EdgeService(driver_path))
print(f'Driver name: {driver.name}')

driver.close

return driver_path
1 change: 1 addition & 0 deletions resources/config/firefoxsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ def get_firefoxdriver_path():

driver = webdriver.Firefox(service=FirefoxService(driver_path))
print(f'Driver name: {driver.name}')
driver.quit

return driver_path

0 comments on commit d1c611a

Please sign in to comment.