-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.18 KB
/
ci_cd_pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI/CD Pipeline
# Defina os eventos que vão disparar o workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Run Tests
run: |
source venv/bin/activate
pytest
mpi-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Install OpenMPI
run: sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev
- name: Run MPI simulation
run: |
source venv/bin/activate
mpiexec -n 4 python src/main.py