Skip to content

Commit

Permalink
Add create/build tests in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed Jan 14, 2025
1 parent a6cd54c commit 2ac6a7f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
File renamed without changes.
41 changes: 41 additions & 0 deletions .github/workflows/cli-create-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create & build with 3lv

on:
pull_request:
branches: [trunk]

jobs:
create-build:
name: Create & build with 3lv
runs-on: elvia-runner
env:
PROJECT_NAME: 'my-cool-project'
strategy:
fail-fast: false
matrix:
template:
- dotnet8-webapi
- dotnet8-worker
- go-webapi
- python-webapi
- python-worker
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install 3lv CLI
uses: 3lvia/cli/setup@trunk

- name: Create project
run: 3lv create -s core -a "$PROJECT_NAME" -t '${{ matrix.template }}' --non-interactive .

- name: Build project
run: |
# Convert to pascal case for .NET
if [[ '${{ matrix.template }}' == "dotnet"* ]]; then
cd $(echo "$PROJECT_NAME" | sed -r 's/(^|-)(.)/\U\2/g')
else
cd "$PROJECT_NAME"
fi
3lv build "$PROJECT_NAME"

0 comments on commit 2ac6a7f

Please sign in to comment.