Skip to content

Commit ab36560

Browse files
committed
chore: Adding job for integration tests
1 parent 319f6c5 commit ab36560

File tree

2 files changed

+63
-55
lines changed

2 files changed

+63
-55
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -241,61 +241,6 @@ jobs:
241241
files: unit-lcov.info
242242
flags: unittests
243243
fail_ci_if_error: true
244-
test-integration:
245-
name: Integration Tests
246-
if: ${{ github.event.pull_request.draft == false && needs.changed_files.outputs.changed-tests-files == 'true' }}
247-
permissions:
248-
contents: read
249-
needs:
250-
- changed_files
251-
runs-on: ubuntu-latest
252-
steps:
253-
- name: Harden the runner (Audit all outbound calls)
254-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
255-
with:
256-
egress-policy: audit
257-
- name: Checkout Code
258-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
259-
- name: Setup Node.js
260-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
261-
with:
262-
node-version: '20'
263-
- name: Install pnpm and plugin dependencies
264-
run: |
265-
npm install -g pnpm
266-
cd plugins
267-
pnpm install
268-
- name: Install TypeScript and ts-node
269-
run: |
270-
npm install -g typescript ts-node
271-
ts-node --version
272-
tsc --version
273-
- name: Prepare
274-
id: init
275-
uses: ./.github/actions/prepare
276-
with:
277-
components: llvm-tools-preview
278-
- name: Get cache-hit output
279-
run: 'echo "Cache hit >>>>>: ${{ steps.init.outputs.cache-hit }}"'
280-
- name: Install cargo hack and cargo-llvm-cov
281-
uses: taiki-e/install-action@92e6dd1c202153a204d471a3c509bf1e03dcfa44 # v2.62.61
282-
with:
283-
tool: cargo-hack,cargo-llvm-cov
284-
- name: Run Integration Tests and Generate Coverage Report
285-
env:
286-
LLVM_PROFILE_FILE: integration.profraw
287-
RUSTFLAGS: -Cinstrument-coverage
288-
RUST_TEST_THREADS: 1
289-
CARGO_PROFILE_DEV_DEBUG: 1
290-
run: cargo hack llvm-cov --locked --ignore-filename-regex "(src/api/routes/docs/.*_docs\.rs$|src/repositories/.*/.*_redis\.rs$)" --lcov --output-path integration-lcov.info --test integration
291-
- name: Upload Integration Coverage to Codecov
292-
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
293-
with:
294-
token: ${{ secrets.CODECOV_TOKEN }}
295-
name: integration-coverage
296-
files: integration-lcov.info
297-
flags: integration
298-
fail_ci_if_error: true
299244
test-properties:
300245
name: Properties Tests
301246
if: ${{ github.event.pull_request.draft == false && needs.changed_files.outputs.changed-tests-files == 'true' }}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: Integration Tests
3+
on:
4+
# Uncomment to run once per day at 2:00 AM UTC
5+
# schedule:
6+
# - cron: "0 2 * * *"
7+
workflow_dispatch: # Allow manual triggering from GitHub UI
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
jobs:
12+
test-integration:
13+
name: Integration Tests
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
steps:
18+
- name: Harden the runner (Audit all outbound calls)
19+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
20+
with:
21+
egress-policy: audit
22+
- name: Checkout Code
23+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
- name: Setup Node.js
25+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
26+
with:
27+
node-version: '20'
28+
- name: Install pnpm and plugin dependencies
29+
run: |
30+
npm install -g pnpm
31+
cd plugins
32+
pnpm install
33+
- name: Install TypeScript and ts-node
34+
run: |
35+
npm install -g typescript ts-node
36+
ts-node --version
37+
tsc --version
38+
- name: Prepare
39+
id: init
40+
uses: ./.github/actions/prepare
41+
with:
42+
components: llvm-tools-preview
43+
- name: Get cache-hit output
44+
run: 'echo "Cache hit >>>>>: ${{ steps.init.outputs.cache-hit }}"'
45+
- name: Install cargo hack and cargo-llvm-cov
46+
uses: taiki-e/install-action@92e6dd1c202153a204d471a3c509bf1e03dcfa44 # v2.62.61
47+
with:
48+
tool: cargo-hack,cargo-llvm-cov
49+
- name: Run Integration Tests and Generate Coverage Report
50+
env:
51+
LLVM_PROFILE_FILE: integration.profraw
52+
RUSTFLAGS: -Cinstrument-coverage
53+
RUST_TEST_THREADS: 1
54+
CARGO_PROFILE_DEV_DEBUG: 1
55+
run: cargo hack llvm-cov --locked --ignore-filename-regex "(src/api/routes/docs/.*_docs\.rs$|src/repositories/.*/.*_redis\.rs$)" --lcov --output-path integration-lcov.info --test integration
56+
- name: Upload Integration Coverage to Codecov
57+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
58+
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
name: integration-coverage
61+
files: integration-lcov.info
62+
flags: integration
63+
fail_ci_if_error: true

0 commit comments

Comments
 (0)