Skip to content

Commit

Permalink
Added gitlab ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas63 committed Oct 23, 2022
1 parent 081315c commit 3058219
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions generators/ci-cd/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ export default class extends CiCdGenerator {
condition: ctx => ctx.ciType === GITHUB,
templates: ['.github/workflows/dotnet.yml']
},
{
condition: ctx => ctx.ciType === GITLAB,
templates: ['.gitlab-ci.yml']
},
],
},
context: this,
Expand Down
18 changes: 18 additions & 0 deletions generators/ci-cd/templates/.gitlab-ci.yml.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
image: mcr.microsoft.com/dotnet/sdk:6.0

before_script:
- dotnet --info
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
- apt-get install -y nodejs
- node --version
- dotnet restore

build:
stage: build
script:
- dotnet build --no-restore

tests:
stage: test
script:
- dotnet test --no-restore

0 comments on commit 3058219

Please sign in to comment.