From e1f99435760b5d59ff99f1b85ba7e51815090c81 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 14 Sep 2021 15:16:21 +0100 Subject: [PATCH] Adda minimal gihub action workflow Most changes are inspired from vscode-ansible extension as we tried to minimize divergence between their configs. --- .github/workflows/ci.yaml | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..4b8d3be9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,44 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + # See https://github.com/ansible/ansible-language-server/issues/26 + # - windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Use Node + uses: actions/setup-node@v2 + with: + node-version: "12" + + - name: Install dependencies + run: | + npm ci + npm run check-dependencies + + - name: Run build + run: npm run compile + + - name: Run test + run: npm test + + # extra safety measure that ensures code was not modified during build + - name: Ensure the job does not produce non-checked-in files + run: git diff --exit-code