Skip to content

chore(data): coordinate edit for 1915.01.101 #247

chore(data): coordinate edit for 1915.01.101

chore(data): coordinate edit for 1915.01.101 #247

Workflow file for this run

name: autofix.ci
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-openapi
cancel-in-progress: true
on:
pull_request:
branches: [ main ]
paths:
- 'server/src/**'
pull_request_target:
types: [ labeled ]
branches: [ main ]
permissions: {}
jobs:
update-server-snapshots:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Setup | Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: {persist-credentials: false}
- name: Install cargo-insta
uses: taiki-e/install-action@887bc4e03483810873d617344dd5189cd82e7b8b # v2.67.11
with:
tool: cargo-insta
- name: Update server snapshots
run: cargo insta test --accept
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2
with:
commit-message: "chore: Update server snapshots"
sort-cargo-toml:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Setup | Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: {persist-credentials: false}
- name: Install cargo-sort
uses: taiki-e/install-action@887bc4e03483810873d617344dd5189cd82e7b8b # v2.67.11
with:
tool: cargo-sort
- name: Sort Cargo.toml
run: cargo sort
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2
with:
commit-message: "chore: sort Cargo.toml"
update-screenshots:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'bless')
permissions:
contents: read
steps:
- name: Setup | Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: {persist-credentials: false}
- name: Setup | pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: latest
- name: Setup | Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: 'pnpm'
cache-dependency-path: tests/pnpm-lock.yaml
- name: Install | Dependencies
run: pnpm install --frozen-lockfile
working-directory: tests
- name: Update | Screenshots
run: pnpm run update-screenshots
working-directory: tests
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2
with:
commit-message: "chore: update screenshots"
update-openapi:
runs-on: ubuntu-latest
permissions:
contents: read
services:
postgres:
image: postgis/postgis:18-3.6
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: navigatum
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- run: rustup update stable && rustup default stable
- name: Setup | Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: {persist-credentials: false}
- name: Setup | Rust-Cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
workspaces: |
server
- name: Setup | Install yq for YAML conversion
run: |
curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
- name: Setup | pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: latest
- name: Setup | Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: 'pnpm'
cache-dependency-path: webclient/pnpm-lock.yaml
- name: Install | Dependencies
run: pnpm install --frozen-lockfile
working-directory: webclient
- name: Build | Compile server
working-directory: server
run: cargo build
env:
CARGO_INCREMENTAL: 0
- name: Run | Start server in background
working-directory: server
run: cargo run &
env:
CARGO_INCREMENTAL: 0
SKIP_MS_SETUP: true
SKIP_DB_SETUP: true
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_URL: localhost
POSTGRES_DB: navigatum
LOG_LEVEL: info
- name: Wait | Server startup
run: |
echo "Waiting for server to start..."
timeout=60
count=0
until curl -f http://localhost:3003/api/status > /dev/null 2>&1; do
if [ $count -ge $timeout ]; then
echo "Server failed to start within $timeout seconds"
exit 1
fi
echo "Waiting for server to be ready... ($count/$timeout)"
sleep 1
count=$((count + 1))
done
echo "Server is ready!"
- name: Fetch | Download OpenAPI spec
run: |
echo "Fetching OpenAPI spec from server..."
curl -f http://localhost:3003/api/openapi.json -o openapi.json
echo "Converting JSON to YAML..."
yq -Poy openapi.json > data/output/openapi.yaml
echo "Cleaning up temporary file..."
rm openapi.json
- name: Update | Refresh types
run: pnpm run type-refresh
working-directory: webclient
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2
with:
commit-message: "chore: Update OpenAPI spec and types"
# This final step is needed to mark the whole workflow as successful
# Don't change its name - it is used by the merge protection rules
done:
name: Finished autofix
runs-on: ubuntu-latest
needs: [ update-server-snapshots, sort-cargo-toml, update-openapi, update-screenshots ]
if: always()
permissions: {}
steps:
- name: Result of the needed steps
run: echo "${{ toJSON(needs) }}" # zizmor: ignore[template-injection]
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
name: CI Result
run: exit 1