Skip to content

Commit 0b50b7b

Browse files
committed
testing...
1 parent 65c25ea commit 0b50b7b

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

.github/workflows/ci.yml

+25-18
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- master
8+
- pg-dump-version
89

910
pull_request:
1011

@@ -107,38 +108,44 @@ jobs:
107108
backend-test:
108109
name: Backend / Test
109110
runs-on: ubuntu-22.04
110-
needs: changed-files
111-
if: needs.changed-files.outputs.non-js == 'true'
111+
# needs: changed-files
112+
# if: needs.changed-files.outputs.non-js == 'true'
112113

113114
env:
114115
RUST_BACKTRACE: 1
115116
TEST_DATABASE_URL: postgres://postgres:postgres@localhost/postgres
116117
RUSTFLAGS: "-D warnings -Cinstrument-coverage"
117118
MALLOC_CONF: "background_thread:true,abort_conf:true,abort:true,junk:true"
118119

119-
services:
120-
postgres:
121-
image: postgres:13@sha256:eee22204934b36935237e7c92355e3178cfdf3c5377dec9c19c848115cc4637b
122-
env:
123-
POSTGRES_PASSWORD: postgres
124-
# Set health checks to wait until postgres has started
125-
options: >-
126-
--health-cmd pg_isready
127-
--health-interval 10s
128-
--health-timeout 5s
129-
--health-retries 5
130-
ports:
131-
- 5432:5432
120+
# services:
121+
# postgres:
122+
# image: postgres:13@sha256:eee22204934b36935237e7c92355e3178cfdf3c5377dec9c19c848115cc4637b
123+
# env:
124+
# POSTGRES_PASSWORD: postgres
125+
# # Set health checks to wait until postgres has started
126+
# options: >-
127+
# --health-cmd pg_isready
128+
# --health-interval 10s
129+
# --health-timeout 5s
130+
# --health-retries 5
131+
# ports:
132+
# - 5432:5432
132133

133134
steps:
134135
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
135136
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
136137

137138
# Update `pg_dump` to the same version as the running PostgreSQL server
138139
- run: sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -v ${{ env.POSTGRES_VERSION }} -i -p
139-
140-
- run: cargo build --tests --workspace
141-
- run: cargo test --workspace
140+
- run: sudo systemctl start postgresql.service
141+
- run: sudo -u postgres psql postgres://postgres:password@localhost/cargo_registry -c "select now()"
142+
# - run: |
143+
# createuser myuser --username=postgres
144+
# createdb --owner myuser mydatabase --username=postgres
145+
# psql -c "ALTER USER myuser WITH PASSWORD 'mypassword'" --username=postgres
146+
147+
# - run: cargo build --tests --workspace
148+
- run: cargo test --package crates_io_worker
142149

143150
- run: curl -sL https://github.com/mozilla/grcov/releases/download/v${{ env.GRCOV_VERSION }}/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar xjf -
144151
- run: rustup component add llvm-tools

0 commit comments

Comments
 (0)