From ce0d7407e01ecd988c95358302891b0df1e20aec Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Fri, 24 Nov 2023 11:33:25 +0100 Subject: [PATCH] Migrate to GHA --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ .semaphore/semaphore.yml | 36 ------------------------------------ README.md | 2 +- 3 files changed, 26 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .semaphore/semaphore.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..118e5b3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + - run: npm ci + - run: npm ci + working-directory: solid-server + - run: npm run lint + - run: npm run build + - run: npm run test + - run: npm run cy:test + - name: Upload Cypress screenshots + uses: actions/upload-artifact@v3 + if: ${{ failure() }} + with: + name: cypress_screenshots + path: cypress/screenshots diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml deleted file mode 100644 index 4bbe71c..0000000 --- a/.semaphore/semaphore.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: v1.0 -name: Umai -agent: - machine: - type: e1-standard-2 - os_image: ubuntu1804 -blocks: - - name: CI - task: - prologue: - commands: - - checkout - - nvm install - - cache restore - - npm ci - - cd solid-server && npm ci && cd .. - - cache store - jobs: - - name: Linting - commands: - - npm run lint - - name: Unit Tests - commands: - - npm test - - name: Integration Tests - commands: - - npm run cy:test - - name: Build - commands: - - npm run build - epilogue: - on_fail: - commands: - - artifact push job cypress/screenshots - skip: - when: branch = 'gh-pages' diff --git a/README.md b/README.md index 98909b4..6d06342 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Umai [![Build Status](https://noeldemartin.semaphoreci.com/badges/umai/branches/main.svg)](https://noeldemartin.semaphoreci.com/projects/umai) +# Umai ![CI](https://github.com/NoelDeMartin/umai/actions/workflows/ci.yml/badge.svg)

Umai logo