From 56116b8ab60f9c59a330e4972366aeaaa7d40945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Celso=20In=C3=A1cio?= Date: Wed, 21 Feb 2024 11:51:03 -0300 Subject: [PATCH] chore: add pipeline tests (#61) * chore: add pipeline tests * chore: remove travis-ci and --- .github/workflows/tests.yml | 41 +++++++++++++++++++++++++++++++++++++ .travis.yml | 23 --------------------- README.md | 3 +-- 3 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..47b5819 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: Run Tests + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + tests: + runs-on: ubuntu-latest + services: + redis: + image: redis:latest + ports: + - 6379:6379 + options: --name redis-test + steps: + - name: Use Node.js 8.x + uses: actions/setup-node@v2 + with: + node-version: '8.x' + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Setup + run: | + make setup + - name: Lint + run: | + make lint + - name: Unit & Integration Tests + env: + REDIS_ENDPOINT: "localhost:${{ job.services.redis.ports['6379'] }}" + run: | + REDIS_ENDPOINT=${REDIS_ENDPOINT} make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d1ca29e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -sudo: false -cache: - directories: - - node_modules -node_js: - - "7" - - "8.13.0" - - "8" - - "node" -env: - - CXX=g++-4.8 REDIS_ENDPOINT=redis://localhost:6379/0 -services: - - redis-server -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 -script: make test -after_success: - npm run send_cover diff --git a/README.md b/README.md index 6e18ce2..3a9c254 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Build Status](https://travis-ci.org/globocom/functions.png?branch=master)](https://travis-ci.org/globocom/functions) -[![Coverage Status](https://coveralls.io/repos/github/globocom/functions/badge.svg?branch=master)](https://coveralls.io/github/globocom/functions?branch=master) +![Tests](https://github.com/globocom/functions/actions/workflows/tests.yml/badge.svg) # Backstage Functions Backstage Functions is an Open Source [Serverless](http://martinfowler.com/articles/serverless.html) Platform able to store and execute code.