Skip to content

Commit

Permalink
chore: update CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-mcosta committed May 8, 2024
1 parent 9fb5945 commit c947787
Showing 1 changed file with 20 additions and 62 deletions.
82 changes: 20 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,26 @@ name: Continuous Integration

on:
push:
branches: [ master, develop ]
branches: [master, develop]
pull_request:
branches: [ master, develop ]
branches: [master, develop]

jobs:
Lint:
runs-on: ubuntu-20.04
steps:
- name: Check out Source Repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 12

- name: Clean Install Project
run: npm ci

- name: Install ESLint
run: npm install -g eslint

- name: Lint with ESLint
uses: stefanoeb/[email protected]

Build:
runs-on: ubuntu-20.04
steps:
- name: Check out Source Repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 12

- name: Clean Install Project
run: npm ci

- name: Build
run: npm run build

Test:
runs-on: ubuntu-20.04
steps:
- name: Check out Source Repository
uses: actions/checkout@v3

- name: Get Modified JavaScript Files
id: changed-javascript-files
uses: tj-actions/changed-files@v37

- name: Setup Node.js
if: contains(steps.changed-javascript-files.outputs.modified_files, '.js')
uses: actions/setup-node@v3
with:
node-version: 12

- name: Clean Install Project
if: contains(steps.changed-javascript-files.outputs.modified_files, '.js')
run: npm ci

- name: Test
if: contains(steps.changed-javascript-files.outputs.modified_files, '.js')
run: npm test
lint:
secrets: inherit
uses: mconf/mconf-ci-jobs/.github/workflows/lb-node-lint.yml@main

test:
secrets: inherit
uses: mconf/mconf-ci-jobs/.github/workflows/lb-node-tests.yml@main
needs: lint

build:
secrets: inherit
uses: mconf/mconf-ci-jobs/.github/workflows/lb-node-build.yml@main
needs: test

scan:
secrets: inherit
uses: mconf/mconf-ci-jobs/.github/workflows/lb-scan.yml@main
needs: build

0 comments on commit c947787

Please sign in to comment.