Skip to content

Commit e2afc1d

Browse files
committed
Add CI
1 parent 993d195 commit e2afc1d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
jobs:
17+
test:
18+
name: 'Build and test'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout source
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Create micromamba environment
27+
uses: mamba-org/setup-micromamba@main
28+
with:
29+
environment-file: dev-environment.yml
30+
cache-environment: true
31+
32+
- name: Build
33+
run: |
34+
meson setup build
35+
cd build
36+
meson compile
37+
38+
- name: Smoke test
39+
working-directory: build
40+
run: |
41+
./git2cpp -v
42+
./git2cpp -h
43+
44+
- name: Run tests
45+
run: |
46+
pytest -v

0 commit comments

Comments
 (0)