diff --git a/.github/workflows/loco-cli-e2e-master.yaml b/.github/workflows/loco-cli-e2e-master.yaml deleted file mode 100644 index 6ffba1494..000000000 --- a/.github/workflows/loco-cli-e2e-master.yaml +++ /dev/null @@ -1,105 +0,0 @@ -name: "[loco-cli:e2e(master)]" - -on: - push: - branches: - - master - pull_request: - -jobs: - # TODO: re-enable after 0.8 to check cmd spawning fix - saas-win32: - runs-on: windows-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - components: rustfmt - - name: Install seaorm cli - run: cargo install sea-orm-cli - - run: | - cargo install --path . - working-directory: ./loco-cli - - run: | - loco new -n saas -t saas --db sqlite --bg async --assets serverside - env: - ALLOW_IN_GIT_REPO: true - - run: | - cargo build - working-directory: ./saas - - run: | - cargo loco routes - working-directory: ./saas - - run: | - cargo loco db migrate - working-directory: ./saas - - run: | - cargo loco generate scaffold movie title:string --htmx - working-directory: ./saas - - run: | - cargo loco db migrate - working-directory: ./saas - - saas: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - run: | - cargo install loco-cli - ALLOW_IN_GIT_REPO=true LOCO_APP_NAME=saas LOCO_TEMPLATE=saas loco new --db postgres --bg queue --assets serverside - - run: | - cargo build - working-directory: ./saas - - rest-api: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - run: | - cargo install loco-cli - ALLOW_IN_GIT_REPO=true LOCO_APP_NAME=restapi LOCO_TEMPLATE=rest-api loco new --db postgres --bg queue - - run: | - cargo build - working-directory: ./restapi - - lightweight-service: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - override: true - - run: | - cargo install loco-cli - ALLOW_IN_GIT_REPO=true LOCO_APP_NAME=lightweight LOCO_TEMPLATE=lightweight-service loco new - - run: | - cargo build - working-directory: ./lightweight diff --git a/.github/workflows/loco-cli-e2e.yaml b/.github/workflows/loco-cli-e2e.yaml deleted file mode 100644 index 88f55aea3..000000000 --- a/.github/workflows/loco-cli-e2e.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: "[loco-cli:e2e]" - -on: - schedule: - - cron: 0 * * * * # every hour - -jobs: - saas: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - run: | - cargo install loco-cli - ALLOW_IN_GIT_REPO=true loco new --template saas --name saas --db sqlite --bg async --assets serverside - - run: | - cargo build - working-directory: ./saas - - rest-api: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - run: | - cargo install loco-cli - ALLOW_IN_GIT_REPO=true loco new --template rest-api --name restapi --db sqlite --bg async - - run: | - cargo build - working-directory: ./restapi - - lightweight-service: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - run: | - cargo install loco-cli - ALLOW_IN_GIT_REPO=true loco new --template lightweight-service --name lightweight --db sqlite --bg async - - run: | - cargo build - working-directory: ./lightweight diff --git a/.github/workflows/loco-cli.yml b/.github/workflows/loco-cli.yml deleted file mode 100644 index 09f8874bb..000000000 --- a/.github/workflows/loco-cli.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: "[loco-cli:ci]" - -on: - push: - branches: - - master - pull_request: - -env: - RUST_TOOLCHAIN: stable - TOOLCHAIN_PROFILE: minimal - -jobs: - style: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: rustfmt - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check - working-directory: ./loco-cli - - name: Run cargo clippy - run: cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms - working-directory: ./loco-cli - - test: - needs: [style] - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - - name: Run cargo test - run: cargo test --all-features --all - working-directory: ./loco-cli - env: - LOCO_CI_MODE: 1 diff --git a/.github/workflows/loco-cli-new.yml b/.github/workflows/loco-new.yml similarity index 98% rename from .github/workflows/loco-cli-new.yml rename to .github/workflows/loco-new.yml index 66e74b248..300ab45a2 100644 --- a/.github/workflows/loco-cli-new.yml +++ b/.github/workflows/loco-new.yml @@ -1,4 +1,4 @@ -name: "[loco-cli:new]" +name: "[loco-new:ci]" on: push: diff --git a/.github/workflows/starter-lightweight-service.yml b/.github/workflows/starter-lightweight-service.yml deleted file mode 100644 index c8f0d8ccd..000000000 --- a/.github/workflows/starter-lightweight-service.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: "[starters/lightweight:ci]" - -on: - push: - branches: - - master - paths: - - starters/lightweight-service/** - pull_request: - paths: - - starters/lightweight-service/** - -env: - RUST_TOOLCHAIN: stable - TOOLCHAIN_PROFILE: minimal - -jobs: - style: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: rustfmt - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check - working-directory: ./starters/lightweight-service - - name: Run cargo clippy - run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility - working-directory: ./starters/lightweight-service - - test: - needs: [style] - runs-on: ubuntu-latest - - permissions: - contents: read - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - name: Run cargo test - run: cargo test --all-features --all - working-directory: ./starters/lightweight-service - - # generate_template: - # name: Generate Template - # needs: [test] - # runs-on: ubuntu-latest - - # permissions: - # contents: read - - # steps: - # - name: Checkout the code - # uses: actions/checkout@v4 - # - uses: dtolnay/rust-toolchain@stable - # with: - # toolchain: ${{ env.RUST_TOOLCHAIN }} - # - name: Setup Rust cache - # uses: Swatinem/rust-cache@v2 - # - name: Inject slug/short variables - # uses: rlespinasse/github-slug-action@v3.x - # - name: Generate template - # run: | - # cargo build --release --features github_ci - # RUST_LOG=debug LOCO_CURRENT_REPOSITORY=${{ github.event.pull_request.head.repo.html_url }} LOCO_CI_MODE=true LOCO_APP_NAME=stateless_html_starter LOCO_TEMPLATE=stateless_html LOCO_BRANCH=${{ env.GITHUB_HEAD_REF_SLUG }} ./target/release/loco new - # cd stateless_html_starter - # echo "Building generate template..." - # cargo build --release - # echo "Run cargo test on generated template..." - # cargo test - # working-directory: ./loco-cli diff --git a/.github/workflows/starter-rest-api.yml b/.github/workflows/starter-rest-api.yml deleted file mode 100644 index 56f4d9b25..000000000 --- a/.github/workflows/starter-rest-api.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: "[starters/rest-api:ci]" - -on: - push: - branches: - - master - paths: - - starters/rest-api/** - pull_request: - paths: - - starters/rest-api/** - -env: - RUST_TOOLCHAIN: stable - TOOLCHAIN_PROFILE: minimal - -jobs: - style: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: rustfmt - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check - working-directory: ./starters/rest-api - - name: Run cargo clippy - run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility - working-directory: ./starters/rest-api - - test: - needs: [style] - runs-on: ubuntu-latest - strategy: - matrix: - db: - - "postgres://postgres:postgres@localhost:5432/postgres_test" - - "sqlite://loco_app.sqlite?mode=rwc" - - permissions: - contents: read - - services: - redis: - image: redis - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - "6379:6379" - postgres: - image: postgres - env: - POSTGRES_DB: postgres_test - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - "5432:5432" - # Set health checks to wait until postgres has started - options: --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - name: Install seaorm cli - run: cargo install sea-orm-cli - - name: Run cargo test - run: cargo loco db reset && cargo loco db entities && cargo test --all-features --all - working-directory: ./starters/rest-api - env: - REDIS_URL: redis://localhost:${{job.services.redis.ports[6379]}} - DATABASE_URL: ${{matrix.db}} - # generate_template: - # name: Generate Template - # needs: [test] - # runs-on: ubuntu-latest - - # permissions: - # contents: read - - # steps: - # - name: Checkout the code - # uses: actions/checkout@v4 - # - uses: dtolnay/rust-toolchain@stable - # with: - # toolchain: ${{ env.RUST_TOOLCHAIN }} - # - name: Setup Rust cache - # uses: Swatinem/rust-cache@v2 - # - name: Inject slug/short variables - # uses: rlespinasse/github-slug-action@v3.x - # - name: Generate template - # run: | - # cargo build --release --features github_ci - # RUST_LOG=debug LOCO_CURRENT_REPOSITORY=${{ github.event.pull_request.head.repo.html_url }} LOCO_CI_MODE=true LOCO_APP_NAME=stateless_starter LOCO_TEMPLATE=stateless LOCO_BRANCH=${{ env.GITHUB_HEAD_REF_SLUG }} ./target/release/loco new - # cd stateless_starter - # echo "Building generate template..." - # cargo build --release - # echo "Run cargo test on generated template..." - # cargo test - # working-directory: ./loco-cli diff --git a/.github/workflows/starter-saas.yml b/.github/workflows/starter-saas.yml deleted file mode 100644 index a59e0be4f..000000000 --- a/.github/workflows/starter-saas.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: "[starters/saas:ci]" - -on: - push: - branches: - - master - paths: - - starters/saas/** - pull_request: - paths: - - starters/saas/** - -env: - RUST_TOOLCHAIN: stable - TOOLCHAIN_PROFILE: minimal - -jobs: - style: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - components: rustfmt - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check - working-directory: ./starters/saas - - name: Run cargo clippy - run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility - working-directory: ./starters/saas - - test: - needs: [style] - runs-on: ubuntu-latest - strategy: - matrix: - db: - - "postgres://postgres:postgres@localhost:5432/postgres_test" - - "sqlite://loco_app.sqlite?mode=rwc" - - permissions: - contents: read - - services: - redis: - image: redis - options: >- - --health-cmd "redis-cli ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - "6379:6379" - postgres: - image: postgres - env: - POSTGRES_DB: postgres_test - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - "5432:5432" - # Set health checks to wait until postgres has started - options: --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - - name: Install seaorm cli - run: cargo install sea-orm-cli - - name: Run cargo test - run: cargo loco db reset && cargo loco db entities && cargo test --all-features --all - working-directory: ./starters/saas - env: - REDIS_URL: redis://localhost:${{job.services.redis.ports[6379]}} - DATABASE_URL: ${{matrix.db}} - - # generate_template: - # name: Generate Template - # needs: [test] - # runs-on: ubuntu-latest - - # permissions: - # contents: read - - # services: - # redis: - # image: redis - # options: >- - # --health-cmd "redis-cli ping" - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 - # ports: - # - "6379:6379" - # postgres: - # image: postgres - # env: - # POSTGRES_DB: postgres_test - # POSTGRES_USER: postgres - # POSTGRES_PASSWORD: postgres - # ports: - # - "5432:5432" - # # Set health checks to wait until postgres has started - # options: --health-cmd pg_isready - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 - # - # steps: - # - name: Checkout the code - # uses: actions/checkout@v4 - # - uses: dtolnay/rust-toolchain@stable - # with: - # toolchain: ${{ env.RUST_TOOLCHAIN }} - # - name: Setup Rust cache - # uses: Swatinem/rust-cache@v2 - # - name: Inject slug/short variables - # uses: rlespinasse/github-slug-action@v3.x - # - name: Generate template - # run: | - # cargo build --release --features github_ci - # RUST_LOG=debug LOCO_CURRENT_REPOSITORY=${{ github.event.pull_request.head.repo.html_url }} LOCO_CI_MODE=true LOCO_APP_NAME=saas_starter LOCO_TEMPLATE=saas LOCO_BRANCH=${{ env.GITHUB_HEAD_REF_SLUG }} ./target/release/loco new - # cd saas_starter - # echo "Building generate template..." - # cargo build --release - # echo "Run cargo test on generated template..." - # cargo test - # working-directory: ./loco-cli - # env: - # APP_REDIS_URI: redis://localhost:${{job.services.redis.ports[6379]}} - # APP_DATABASE_URI: postgres://postgres:postgres@localhost:5432/postgres_test