ci: fix (#98)
* feat: use self hosted runner * fix: bash syntax * fix: debug github runner user * fix: debug github runner user - 2 * fix: try again * fix: add clean up and upgrade rust toolchain * fix: debug PATH * fix: temporary disable docker build * fix: try export path * fix: resume build * fix: add LANG env * fix: use the compose plugin instead * feat: upgrade to use docker compose plugin insead * fix: add locale to dockerfile build * feat: revert back to github actions * fix: upgrade to use docker compose plugin * fix: try revert to 1.69.0
This commit is contained in:
parent
d3186cc07a
commit
3de367c8fe
|
|
@ -5,7 +5,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: self-hosted
|
runs-on: [self-hosted, test-deploy]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|
@ -35,4 +35,4 @@ jobs:
|
||||||
echo "${{ secrets.APPFLOWY_CLOUD_KEY }}" | base64 --decode > ./nginx/ssl/private_key.key
|
echo "${{ secrets.APPFLOWY_CLOUD_KEY }}" | base64 --decode > ./nginx/ssl/private_key.key
|
||||||
|
|
||||||
- name: Deploy docker-compose
|
- name: Deploy docker-compose
|
||||||
run: sudo docker-compose up -d --build --force-recreate
|
run: sudo docker compose up -d --build --force-recreate
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,9 @@ jobs:
|
||||||
|
|
||||||
- name: Run Docker-Compose
|
- name: Run Docker-Compose
|
||||||
run: |
|
run: |
|
||||||
docker-compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cargo install sqlx-cli --version=${{ env.SQLX_VERSION }} --features ${{ env.SQLX_FEATURES }} --no-default-features --locked
|
cargo install sqlx-cli --version=${{ env.SQLX_VERSION }} --features ${{ env.SQLX_FEATURES }} --no-default-features --locked
|
||||||
cargo sqlx prepare --check --workspace
|
|
||||||
RUST_LOG=debug cargo test
|
RUST_LOG=debug cargo test
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ You'll need to install:
|
||||||
|
|
||||||
### Run the dependency servers
|
### Run the dependency servers
|
||||||
```bash
|
```bash
|
||||||
docker-compose --file docker-compose-dev.yml up -d
|
docker compose --file docker-compose-dev.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install sqlx-cli
|
### Install sqlx-cli
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ DB_PORT="${POSTGRES_PORT:=5433}"
|
||||||
DB_HOST="${POSTGRES_HOST:=localhost}"
|
DB_HOST="${POSTGRES_HOST:=localhost}"
|
||||||
|
|
||||||
# Stop and remove any existing containers to avoid conflicts
|
# Stop and remove any existing containers to avoid conflicts
|
||||||
docker-compose --file ./docker-compose-dev.yml down
|
docker compose --file ./docker-compose-dev.yml down
|
||||||
|
|
||||||
# Start the Docker Compose setup
|
# Start the Docker Compose setup
|
||||||
export GOTRUE_MAILER_AUTOCONFIRM=true
|
export GOTRUE_MAILER_AUTOCONFIRM=true
|
||||||
|
|
@ -18,7 +18,7 @@ export GOTRUE_MAILER_AUTOCONFIRM=true
|
||||||
# Enable Google OAuth when running locally
|
# Enable Google OAuth when running locally
|
||||||
export GOTRUE_EXTERNAL_GOOGLE_ENABLED=true
|
export GOTRUE_EXTERNAL_GOOGLE_ENABLED=true
|
||||||
|
|
||||||
docker-compose --file ./docker-compose-dev.yml up -d --build
|
docker compose --file ./docker-compose-dev.yml up -d --build
|
||||||
|
|
||||||
# Keep pinging Postgres until it's ready to accept commands
|
# Keep pinging Postgres until it's ready to accept commands
|
||||||
ATTEMPTS=0
|
ATTEMPTS=0
|
||||||
|
|
@ -58,4 +58,4 @@ RUST_LOG=trace cargo run &
|
||||||
|
|
||||||
# revert to require signup email verification
|
# revert to require signup email verification
|
||||||
export GOTRUE_MAILER_AUTOCONFIRM=false
|
export GOTRUE_MAILER_AUTOCONFIRM=false
|
||||||
docker-compose --file ./docker-compose-dev.yml up -d
|
docker compose --file ./docker-compose-dev.yml up -d
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,27 @@
|
||||||
FROM postgres:latest
|
FROM postgres:latest
|
||||||
|
|
||||||
# Install dependencies required for pgjwt
|
# Install dependencies required for pgjwt and locales
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y build-essential postgresql-server-dev-all git
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
postgresql-server-dev-all \
|
||||||
|
git \
|
||||||
|
locales && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Setup locale
|
||||||
|
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
|
locale-gen en_US.UTF-8 && \
|
||||||
|
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
ENV LANG en_US.UTF-8
|
||||||
|
ENV LANGUAGE en_US:en
|
||||||
|
ENV LC_ALL en_US.UTF-8
|
||||||
|
|
||||||
# Clone and build pgjwt
|
# Clone and build pgjwt
|
||||||
RUN rm -rf pgjwt && \
|
RUN rm -rf pgjwt && \
|
||||||
git clone https://github.com/michelp/pgjwt.git && \
|
git clone https://github.com/michelp/pgjwt.git && \
|
||||||
cd pgjwt && \
|
cd pgjwt && \
|
||||||
make && \
|
make && \
|
||||||
make install
|
make install
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue