From 17eb9b1fd356e22fe55b49778d946e441220ad93 Mon Sep 17 00:00:00 2001 From: Erick Wendel Date: Tue, 23 Jul 2024 18:41:10 -0300 Subject: [PATCH] add actions Signed-off-by: Erick Wendel --- .github/workflows/run-tests.yml | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..77d600d --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,39 @@ +name: Cypress Tests - Complete Project + +on: + push: + branches: + - main + paths: + - '**.js' + - '**.json' + - '**.yml' + +jobs: + setup-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Compose + run: | + sudo rm /usr/local/bin/docker-compose + curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /tmp/docker-compose + chmod +x /tmp/docker-compose + sudo mv /tmp/docker-compose /usr/local/bin/docker-compose + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Start nodered + run: npm run docker:install-module + + - run: npm ci + - run: npm run cypress:headless + + - name: Clean up + run: docker-compose down --volumes \ No newline at end of file