Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Jan 27, 2025
1 parent a93db59 commit fb5eff6
Showing 1 changed file with 39 additions and 30 deletions.
69 changes: 39 additions & 30 deletions .github/workflows/_check-codestyle-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,45 @@ jobs:
- name: Get postgres headers
run: make postgres-headers -j$(nproc)

# To check diesel schema, we need any version of Postgres, so get it from build artifacts
- name: Download Latest Neon artifact
if: ${{ !cancelled() }}
uses: ./.github/actions/download
with:
name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact
path: /tmp/neon/
prefix: latest
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}

- name: Check diesel schema
if: ${{ !cancelled() }}
env:
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
DATABASE_URL: postgresql://localhost:1235/storage_controller
run: |
export LD_LIBRARY_PATH=${POSTGRES_DISTRIB_DIR}/v16/lib
cargo neon init
cargo neon storage_controller start
diesel print-schema > storage_controller/src/schema.rs
if [ -n "$(git diff storage_controller/src/schema.rs)" ]; then
echo >&2 "Uncommitted changes in diesel schema"
git diff .
exit 1
fi
- name: DEBUG
if: always()
run: |
for f in find . -name "*.log"; do
echo "=== $f ==="
cat $f
done
# cargo hack runs the given cargo subcommand (clippy in this case) for all feature combinations.
# This will catch compiler & clippy warnings in all feature combinations.
# TODO: use cargo hack for build and test as well, but, that's quite expensive.
Expand Down Expand Up @@ -92,33 +131,3 @@ jobs:
- name: Check rust licenses/bans/advisories/sources
if: ${{ !cancelled() }}
run: cargo deny check --hide-inclusion-graph

# To check diesel schema, we need any version of Postgres, so get it from build artifacts
- name: Download Latest Neon artifact
if: ${{ !cancelled() }}
uses: ./.github/actions/download
with:
name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact
path: /tmp/neon/
prefix: latest
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}

- name: Check diesel schema
if: ${{ !cancelled() }}
env:
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
DATABASE_URL: postgresql://localhost:1235/storage_controller
run: |
export LD_LIBRARY_PATH=${POSTGRES_DISTRIB_DIR}/v16/lib
cargo neon init
cargo neon storage_controller start
diesel print-schema > storage_controller/src/schema.rs
if [ -n "$(git diff storage_controller/src/schema.rs)" ]; then
echo >&2 "Uncommitted changes in diesel schema"
git diff .
exit 1
fi

0 comments on commit fb5eff6

Please sign in to comment.