-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (45 loc) · 1.23 KB
/
main.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
name: Python CI/CD Workflow
on:
push:
branches:
- feature/ci
pull_request:
branches:
- feature/ci
jobs:
build_macos:
runs-on: macos-latest
steps:
# Restore the .git directory from the cache
- name: Cache repository
uses: actions/cache@v3
with:
path: .git
key: ${{ runner.os }}-git-${{ hashFiles('.git/HEAD') }}
restore-keys: |
${{ runner.os }}-git-
# Check out the repository without LFS support
- name: Check out repository
uses: actions/checkout@v3
with:
lfs: false # Disable Git LFS
# Step 1: Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.11
environment-file: environment.yml
activate-environment: OpenVPCal
miniconda-version: "latest" # Ensure Miniconda is installed
# Step 2: Initialize Conda
- name: Initialize Conda
shell: bash
run: |
conda init
# Step 4: Run unit tests
- name: Run unit tests
shell: bash
run: |
conda activate OpenVPCal
pytest tests