fix(cli_mode): don't prompt for db url if in cli_mode #177
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CLI Continuous Integration (Compilation tests for variations of Actix + Postgres) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "**.rs" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
pull_request: | |
paths: | |
- "**.rs" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
concurrency: | |
group: CI-AP-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# naming convention is: [backend]-[database]-[plugins] | |
Actix-Postgres-None: | |
name: Actix w/ Postgres and no plugins | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3.6.0 | |
- uses: rui314/setup-mold@v1 | |
- run: rustup install stable | |
- run: rustup update | |
- uses: actions/cache@v3.3.1 | |
with: | |
path: | | |
.cargo/.build | |
key: ${{ runner.os }}-cargo-cli-AP-${{ hashFiles('**/Cargo.lock') }} | |
- run: git config --global user.name test | |
- run: git config --global user.email example@email.com | |
- uses: actions-rs/cargo@v1.0.3 | |
with: | |
command: run | |
args: --bin create-rust-app -- create -c -d postgres -b actix-web test-project | |
- name: test test-project | |
working-directory: ./test-project | |
run: | | |
printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs | |
sed -i 's/create-rust-app = {/create-rust-app = { path = "..\/create-rust-app", /' ./Cargo.toml | |
cargo dsync | |
cargo check | |
Actix-Postgres-All: | |
# needs: [Actix-Postgres-None] | |
name: Actix w/ Postgres and all valid plugins | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3.6.0 | |
- uses: rui314/setup-mold@v1 | |
- run: rustup install stable | |
- run: rustup update | |
- uses: actions/cache@v3.3.1 | |
with: | |
path: | | |
.cargo/.build | |
key: ${{ runner.os }}-cargo-cli-AP-all-${{ hashFiles('**/Cargo.lock') }} | |
- run: git config --global user.name test | |
- run: git config --global user.email example@email.com | |
- uses: actions-rs/cargo@v1.0.3 | |
with: | |
command: run | |
args: --bin create-rust-app -- create -c -d postgres -b actix-web --plugins=auth,container,graphql,storage,utoipa test-project | |
- name: test test-project | |
working-directory: ./test-project | |
run: | | |
printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs | |
sed -i 's/create-rust-app]/create-rust-app]\npath = "..\/create-rust-app"/' Cargo.toml | |
cargo dsync | |
cargo check | |
# Actix-Postgres-Container: | |
# needs: [Actix-Postgres-None] | |
# name: Actix w/ Postgres and the container plugin | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3.6.0 | |
# - uses: rui314/setup-mold@v1 | |
# - run: rustup install stable | |
# - run: rustup update | |
# - uses: actions/cache@v3.3.1 | |
# with: | |
# path: | | |
# **/.cargo/.build | |
# **/target | |
# key: ${{ runner.os }}-cargo-cli-AP-${{ hashFiles('**/Cargo.lock') }} | |
# - run: git config --global user.name test | |
# - run: git config --global user.email example@email.com | |
# - uses: actions-rs/cargo@v1.0.3 | |
# with: | |
# command: run | |
# args: --bin create-rust-app -- create -c -d postgres -b actix-web --plugins=container test-project | |
# - run: cd test-project && printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs && cargo dsync && cargo check | |
# | |
# Actix-Postgres-Auth: | |
# needs: [Actix-Postgres-None] | |
# name: Actix w/ Postgres and the auth plugin | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3.6.0 | |
# - uses: rui314/setup-mold@v1 | |
# - run: rustup install stable | |
# - run: rustup update | |
# - uses: actions/cache@v3.3.1 | |
# with: | |
# path: | | |
# **/.cargo/.build | |
# **/target | |
# key: ${{ runner.os }}-cargo-cli-AP-${{ hashFiles('**/Cargo.lock') }} | |
# - run: git config --global user.name test | |
# - run: git config --global user.email example@email.com | |
# - uses: actions-rs/cargo@v1.0.3 | |
# with: | |
# command: run | |
# args: --bin create-rust-app -- create -c -d postgres -b actix-web --plugins=auth test-project | |
# - run: cd test-project && printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs && cargo dsync && cargo check | |
# | |
# Actix-Postgres-Storage: | |
# needs: [Actix-Postgres-None] | |
# name: Actix w/ Postgres and the storage plugin | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3.6.0 | |
# - uses: rui314/setup-mold@v1 | |
# - run: rustup install stable | |
# - run: rustup update | |
# - uses: actions/cache@v3.3.1 | |
# with: | |
# path: | | |
# **/.cargo/.build | |
# **/target | |
# key: ${{ runner.os }}-cargo-cli-AP-${{ hashFiles('**/Cargo.lock') }} | |
# - run: git config --global user.name test | |
# - run: git config --global user.email example@email.com | |
# - uses: actions-rs/cargo@v1.0.3 | |
# with: | |
# command: run | |
# args: --bin create-rust-app -- create -c -d postgres -b actix-web --plugins=storage test-project | |
# - run: cd test-project && printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs && cargo dsync && cargo check | |
# | |
# Actix-Postgres-GraphQL: | |
# needs: [Actix-Postgres-None] | |
# name: Actix w/ Postgres and the graphql plugin | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3.6.0 | |
# - uses: rui314/setup-mold@v1 | |
# - run: rustup install stable | |
# - run: rustup update | |
# - uses: actions/cache@v3.3.1 | |
# with: | |
# path: | | |
# **/.cargo/.build | |
# **/target | |
# key: ${{ runner.os }}-cargo-cli-AP-${{ hashFiles('**/Cargo.lock') }} | |
# - run: git config --global user.name test | |
# - run: git config --global user.email example@email.com | |
# - uses: actions-rs/cargo@v1.0.3 | |
# with: | |
# command: run | |
# args: --bin create-rust-app -- create -c -d postgres -b actix-web --plugins=graphql,auth test-project | |
# - run: cd test-project && printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs && cargo dsync && cargo check | |
# | |
# Actix-Postgres-Utoipa: | |
# needs: [Actix-Postgres-None] | |
# name: Actix w/ Postgres and the utoipa plugin | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3.6.0 | |
# - uses: rui314/setup-mold@v1 | |
# - run: rustup install stable | |
# - run: rustup update | |
# - uses: actions/cache@v3.3.1 | |
# with: | |
# path: | | |
# **/.cargo/.build | |
# **/target | |
# key: ${{ runner.os }}-cargo-cli-AP-${{ hashFiles('**/Cargo.lock') }} | |
# - run: git config --global user.name test | |
# - run: git config --global user.email example@email.com | |
# - uses: actions-rs/cargo@v1.0.3 | |
# with: | |
# command: run | |
# args: --bin create-rust-app -- create -c -d postgres -b actix-web --plugins=auth,utoipa test-project | |
# - run: cd test-project && printf "// @generated automatically by Diesel CLI.\ndiesel::table! {\n todos (id) {\n id -> Int4,\n text -> Text,\n created_at -> Timestamptz,\n updated_at -> Timestamptz,\n }\n}" >> ./backend/schema.rs && cargo dsync && cargo check |