Skip to content

Commit d9ba8f5

Browse files
authored
refactor(ci): Build openapi before proposing PR (#462)
Approach of downloading the github pages artifact for proposing a PR to the OSC leads to the delay of 1 change (only after next PR is merged the changes are proposed to the osc with the name of the last PR). This is caused by the fact that it takes some seconds for openapi to be published and so the propagate job mostly uses the outdated one.
1 parent e742e7c commit d9ba8f5

File tree

4 files changed

+27
-34
lines changed

4 files changed

+27
-34
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ jobs:
5050
- name: Rust Cache
5151
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
5252

53-
- name: Run tests
53+
- name: Run tests (unit)
5454
run: cargo nextest run
5555

5656
- name: Run tests (sqlite)
5757
run: cargo nextest run --test integration
5858

59-
- name: Run tests for mysql
59+
- name: Run tests (mysql)
6060
run: cargo nextest run --test integration --profile mysql --no-capture
6161

6262
- name: Run tests for postgres

.github/workflows/committed.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/linters.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,21 @@ jobs:
116116

117117
- name: Test OPA policies
118118
run: opa fmt policy --check-result
119+
120+
committed:
121+
name: Lint Commits
122+
runs-on: ubuntu-latest
123+
steps:
124+
125+
- name: Harden Runner
126+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
127+
with:
128+
egress-policy: audit
129+
130+
- name: Checkout Actions Repository
131+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
132+
with:
133+
fetch-depth: 0
134+
135+
- name: Lint Commits
136+
uses: crate-ci/committed@15229711f8f597474c0b636f327cde5969f9a529 # v1.1.7

.github/workflows/propose_osc_changes.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
with:
2323
fetch-depth: 0 # get all commits
2424

25+
- name: Install Rust
26+
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable
27+
with:
28+
toolchain: stable
29+
2530
- name: Get the codegenerator
2631
run: git clone https://opendev.org/openstack/codegenerator
2732

@@ -33,8 +38,8 @@ jobs:
3338
- name: Prepare the work dir
3439
run: mkdir -p codegenerator/wrk/openapi_specs/identity
3540

36-
- name: Get the fresh openapi for the codegenerator
37-
run: curl https://openstack-experimental.github.io/keystone/openapi.yaml -o codegenerator/wrk/openapi_specs/identity/keystone_rust.yaml
41+
- name: Generate OpenAPI
42+
run: cargo run --bin keystone -- --dump-openapi yaml > codegenerator/wrk/openapi_specs/identity/keystone_rust.yaml
3843

3944
- name: Install the codegenerator
4045
working-directory: codegenerator

0 commit comments

Comments
 (0)