Skip to content

Commit f856861

Browse files
authored
Merge branch 'rust-lang:master' into categorize-errors
2 parents bec60b6 + dcfaa83 commit f856861

15 files changed

+545
-238
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
run: cargo sqlx migrate run --database-url $DOCSRS_DATABASE_URL
5353

5454
- name: run sqlx prepare --check
55-
run: just sqlx-check
55+
run: just sqlx-prepare
5656

5757
- name: test reverse migrations
5858
run: |
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
pull_request_target:
3+
branches:
4+
- master
5+
types: [closed]
6+
7+
env:
8+
RUST_BACKTRACE: 1
9+
RUST_CACHE_KEY: rust-cache-20241114
10+
DOCSRS_PREFIX: ignored/cratesfyi-prefix
11+
DOCSRS_DATABASE_URL: postgresql://cratesfyi:password@localhost:15432
12+
DOCSRS_LOG: docs_rs=debug,rustwide=info
13+
AWS_ACCESS_KEY_ID: cratesfyi
14+
AWS_SECRET_ACCESS_KEY: secret_key
15+
S3_ENDPOINT: http://localhost:9000
16+
DOCSRS_INCLUDE_DEFAULT_TARGETS: false
17+
DOCSRS_DOCKER_IMAGE: ghcr.io/rust-lang/crates-build-env/linux-micro
18+
SENTRY_ENVIRONMENT: dev
19+
20+
permissions:
21+
contents: write
22+
23+
jobs:
24+
commit-sqlx-changes:
25+
if: ${{ github.event.pull_request.merged }}
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: install `just`
31+
run: sudo snap install --edge --classic just
32+
33+
- name: restore build & cargo cache
34+
uses: Swatinem/rust-cache@v2
35+
with:
36+
prefix-key: ${{ env.RUST_CACHE_KEY }}
37+
38+
- name: Launch postgres
39+
run: |
40+
cp .env.sample .env
41+
mkdir -p ${DOCSRS_PREFIX}/public-html
42+
docker compose up -d db s3
43+
# Give the database enough time to start up
44+
sleep 5
45+
# Make sure the database is actually working
46+
psql "${DOCSRS_DATABASE_URL}"
47+
48+
- name: install SQLX CLI
49+
run: cargo install sqlx-cli --no-default-features --features postgres
50+
51+
- name: Commit sqlx changes on master branch if any
52+
run: |
53+
just sqlx-prepare
54+
# If there are differences in the SQLX files, then we push them on the master branch
55+
if git status --porcelain .sqlx ; then
56+
git config --global user.name 'Docs.rs developers'
57+
git config --global user.email '[email protected]'
58+
git add .sqlx
59+
git commit -m 'Update SQLX files'
60+
git push
61+
fi
62+
63+
- name: Clean up the database
64+
run: docker compose down --volumes

.github/workflows/tag-merged-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
pull_request_target:
3-
branches:
3+
branches:
44
- master
55
types: [closed]
66

.sqlx/query-9ae6841c8cdba0bdbb518d2ee0fdfd0374f2b8e650fa12c3931da3ee2e1ed82c.json renamed to .sqlx/query-118390f408685404fa25f1de88df56c6f943b5530760163ff8a667fac627626f.json

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-bc0b3932dc2f8bd2b8a9f5a312262eafefd3b80b3322116448901aa55f2d89e7.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)