From 9031714fe2f8478770d43e430373171224f1cfe2 Mon Sep 17 00:00:00 2001 From: Dominic Burger Date: Thu, 10 Oct 2024 13:26:23 +0200 Subject: [PATCH] Add CI workflow --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b2a69a0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Install .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0" + + - name: Add GitHub NuGet Registry + run: dotnet nuget add source --username "GeoWerkstatt-Build" --password "%GITHUB_TOKEN%" --store-password-in-clear-text --name github "https://nuget.pkg.github.com/GeoWerkstatt/index.json" + + - name: Restore packages + run: dotnet restore ./language-server/src + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build language-server + run: dotnet build --no-restore /warnaserror ./language-server/src + + - name: Run language-server tests + run: dotnet test --no-build ./language-server/src + + - name: Install packages + run: npm ci + + - name: Build extension + run: npm run compile + + - name: Lint extension + run: npm run lint