Skip to content

.github/workflows/Languages-Python-Example1.yml #2

.github/workflows/Languages-Python-Example1.yml

.github/workflows/Languages-Python-Example1.yml #2

name: CI Test for mc_pi
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: # This enables manual triggering of the workflow
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the required Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # If you have a requirements.txt file in the repo
- name: Run mc_pi.py
run: |
python Languages/Python/Example1/mc_pi.py
slurm:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install SLURM
run: |
sudo apt-get update
sudo apt-get install -y slurm-wlm
- name: Run SLURM batch file
run: |
sbatch Languages/Python/Example1/run.slurm