Skip to content

Commit ac2c1bd

Browse files
authored
Merge pull request #204 from code0-tech/setup-docs
Setup draco as telescopium content repository
2 parents e344484 + 841cc98 commit ac2c1bd

5 files changed

Lines changed: 159 additions & 91 deletions

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,49 @@
1-
name: Rust CI/CD Pipeline
1+
name: CI
22

33
on:
44
push:
5+
branches:
6+
- main
57
pull_request:
6-
types: [opened, reopened]
78

8-
env:
9-
RUST_BACKTRACE: 1
9+
permissions:
10+
pull-requests: write
1011

1112
jobs:
12-
# Job 1: Format Check
13-
format:
14-
name: Format Check
13+
pipeline:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v6
19-
20-
- name: Install Rust toolchain
21-
uses: dtolnay/rust-toolchain@stable
16+
- uses: Taucher2003/GitLab-Pipeline-Action@1.14.4
17+
name: Run pipeline
18+
id: pipeline
2219
with:
23-
components: rustfmt
24-
25-
- name: Check formatting
26-
run: cargo fmt --all -- --check
27-
28-
# Job 2: Lint Check
29-
lint:
30-
name: Lint Check
31-
runs-on: ubuntu-latest
32-
steps:
33-
- name: Checkout code
34-
uses: actions/checkout@v6
35-
36-
- name: Install Rust toolchain
37-
uses: dtolnay/rust-toolchain@stable
20+
GL_SERVER_URL: https://gitlab.com
21+
GL_PROJECT_ID: '81430101'
22+
GL_RUNNER_TOKEN: ${{ secrets.GL_RUNNER_TOKEN }}
23+
GL_API_TOKEN: ${{ secrets.GL_API_TOKEN }}
24+
SHOW_JOB_LOGS: all
25+
OVERRIDE_GITHUB_SHA: ${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }}
26+
OVERRIDE_GITHUB_REF_NAME: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.ref }}
27+
env:
28+
GLPA_C0_GH_REF: ${{ github.ref }}
29+
GLPA_C0_GH_REF_NAME: ${{ github.ref_name }}
30+
31+
- name: Find existing comment
32+
uses: peter-evans/find-comment@v4
33+
id: find-comment
34+
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
3835
with:
39-
components: clippy
36+
issue-number: ${{ github.event.pull_request.number }}
37+
comment-author: 'github-actions[bot]'
38+
body-includes: <!-- glpa_comment:pipeline -->
4039

41-
- name: Cache cargo registry
42-
uses: actions/cache@v5
40+
- name: Create or update comment
41+
uses: peter-evans/create-or-update-comment@v5
42+
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
4343
with:
44-
path: |
45-
~/.cargo/registry
46-
~/.cargo/git
47-
target
48-
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
49-
restore-keys: |
50-
${{ runner.os }}-cargo-
51-
52-
- name: Run clippy
53-
run: cargo clippy --all-targets --all-features
54-
55-
# Job 3: Build
56-
build:
57-
name: Build
58-
needs: [ lint, format ]
59-
runs-on: ubuntu-latest
60-
steps:
61-
- name: Checkout code
62-
uses: actions/checkout@v6
63-
64-
- name: Install Rust toolchain
65-
uses: dtolnay/rust-toolchain@stable
66-
67-
- name: Cache cargo registry
68-
uses: actions/cache@v5
69-
with:
70-
path: |
71-
~/.cargo/registry
72-
~/.cargo/git
73-
target
74-
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
75-
restore-keys: |
76-
${{ runner.os }}-cargo-
77-
78-
- name: Build project
79-
run: cargo build --verbose --all-features
80-
81-
test:
82-
name: Test
83-
needs: build
84-
runs-on: ubuntu-latest
85-
steps:
86-
- name: Checkout code
87-
uses: actions/checkout@v6
88-
89-
- name: Install Rust toolchain
90-
uses: dtolnay/rust-toolchain@stable
91-
92-
- name: Cache cargo registry
93-
uses: actions/cache@v5
94-
with:
95-
path: |
96-
~/.cargo/registry
97-
~/.cargo/git
98-
target
99-
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
100-
restore-keys: |
101-
${{ runner.os }}-cargo-
102-
103-
- name: Run Tests
104-
run: cargo test --verbose --all-features
44+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
45+
issue-number: ${{ github.event.pull_request.number }}
46+
body: |
47+
<!-- glpa_comment:pipeline -->
48+
${{ steps.pipeline.outputs.SUMMARY_TEXT }}
49+
edit-mode: replace

.github/workflows/rust.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Rust CI/CD Pipeline
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, reopened]
7+
8+
env:
9+
RUST_BACKTRACE: 1
10+
11+
jobs:
12+
# Job 1: Format Check
13+
format:
14+
name: Format Check
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v6
19+
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: rustfmt
24+
25+
- name: Check formatting
26+
run: cargo fmt --all -- --check
27+
28+
# Job 2: Lint Check
29+
lint:
30+
name: Lint Check
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v6
35+
36+
- name: Install Rust toolchain
37+
uses: dtolnay/rust-toolchain@stable
38+
with:
39+
components: clippy
40+
41+
- name: Cache cargo registry
42+
uses: actions/cache@v5
43+
with:
44+
path: |
45+
~/.cargo/registry
46+
~/.cargo/git
47+
target
48+
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-cargo-
51+
52+
- name: Run clippy
53+
run: cargo clippy --all-targets --all-features
54+
55+
# Job 3: Build
56+
build:
57+
name: Build
58+
needs: [ lint, format ]
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v6
63+
64+
- name: Install Rust toolchain
65+
uses: dtolnay/rust-toolchain@stable
66+
67+
- name: Cache cargo registry
68+
uses: actions/cache@v5
69+
with:
70+
path: |
71+
~/.cargo/registry
72+
~/.cargo/git
73+
target
74+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
75+
restore-keys: |
76+
${{ runner.os }}-cargo-
77+
78+
- name: Build project
79+
run: cargo build --verbose --all-features
80+
81+
test:
82+
name: Test
83+
needs: build
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v6
88+
89+
- name: Install Rust toolchain
90+
uses: dtolnay/rust-toolchain@stable
91+
92+
- name: Cache cargo registry
93+
uses: actions/cache@v5
94+
with:
95+
path: |
96+
~/.cargo/registry
97+
~/.cargo/git
98+
target
99+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
100+
restore-keys: |
101+
${{ runner.os }}-cargo-
102+
103+
- name: Run Tests
104+
run: cargo test --verbose --all-features

.gitlab-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
stages:
2+
- test
3+
4+
include:
5+
- project: code0-tech/development/telescopium
6+
ref: build-branch
7+
file: ci-template.gitlab-ci.yml

docs/index.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Welcome to the Documentation for Draco
3+
description: Find out how the adapter works
4+
template: splash
5+
---
6+
7+
Draco receives requests and triggers executions.

docs/meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"title": "Draco",
3+
"description": "The adapter",
4+
"root": true
5+
}

0 commit comments

Comments
 (0)