Skip to content

Commit a36b0fe

Browse files
committed
Add GitHub Actions CI workflow
1 parent 214a137 commit a36b0fe

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
# Runs on PRs and pushes to the default branch. We use `pull_request` (never
4+
# `pull_request_target`), so secrets are NOT exposed to pull requests from forks.
5+
on:
6+
pull_request:
7+
push:
8+
branches: [main, master]
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ci-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Install dependencies
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y cmake g++ pkg-config libssl-dev libcpprest-dev libboost-all-dev libsecret-1-dev
26+
- name: Configure
27+
run: cmake -S . -B build
28+
- name: Build
29+
run: cmake --build build -j
30+
- name: Run tests
31+
run: ctest --test-dir build --output-on-failure
32+
env:
33+
FASTCOMMENTS_API_KEY: ${{ secrets.FASTCOMMENTS_API_KEY }}
34+
FASTCOMMENTS_TENANT_ID: ${{ secrets.FASTCOMMENTS_TENANT_ID }}

0 commit comments

Comments
 (0)