From 894a4e395d2d8e6306ba1c18f4d0bc3d3ecf5a33 Mon Sep 17 00:00:00 2001 From: Julio Marin Date: Thu, 8 Feb 2024 16:25:29 -0500 Subject: [PATCH] Pipeline creation (#3) * Develop (#2) * rename pipeline * rename pipeline * rename ci and cd files, add json creation and deployment --- .../cd-dev-botnorrea-v2-telegram.yml | 44 +++++++++++++++++++ ... => ci-dev-botnorrea-v2-telegram copy.yml} | 4 +- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/cd-dev-botnorrea-v2-telegram.yml rename .github/workflows/{ci-dev-botnorrea-v2-telegram.yml => ci-dev-botnorrea-v2-telegram copy.yml} (89%) diff --git a/.github/workflows/cd-dev-botnorrea-v2-telegram.yml b/.github/workflows/cd-dev-botnorrea-v2-telegram.yml new file mode 100644 index 0000000..4dac442 --- /dev/null +++ b/.github/workflows/cd-dev-botnorrea-v2-telegram.yml @@ -0,0 +1,44 @@ +name: cd-dev-botnorrea-v2-telegram + +on: + push: + branches: [develop] + +jobs: + unit-test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ["18.x"] + + steps: + - uses: actions/checkout@v3 + + - name: Using Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm i + + - name: Run tests + run: npm run coverage + + - name: Check coverage + uses: VeryGoodOpenSource/very_good_coverage@v1.1.1 + with: + path: "coverage/lcov.info" + min_coverage: 30 + + - name: Create JSON + id: create-json + uses: jsdaniell/create-json@v1.2.3 + with: + name: "dev.json" + json: ${{ secrets.CONFIG_FILE_DEV }} + dir: "config/" + + - name: Deploy + run: npm run dev:deploy diff --git a/.github/workflows/ci-dev-botnorrea-v2-telegram.yml b/.github/workflows/ci-dev-botnorrea-v2-telegram copy.yml similarity index 89% rename from .github/workflows/ci-dev-botnorrea-v2-telegram.yml rename to .github/workflows/ci-dev-botnorrea-v2-telegram copy.yml index 7ab39f4..71bd8a3 100644 --- a/.github/workflows/ci-dev-botnorrea-v2-telegram.yml +++ b/.github/workflows/ci-dev-botnorrea-v2-telegram copy.yml @@ -13,10 +13,10 @@ jobs: node-version: ["18.x"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Using Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }}