From a9c0de45b398657f36ce78a0fcd7ca4339ef8a4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 21 Aug 2021 20:26:42 +0200 Subject: [PATCH] Merge GH actions in one file. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .github/workflows/{build.yml => ci.yml} | 28 +++++++++++------------ .github/workflows/lint.yml | 29 ------------------------ .github/workflows/unit-tests.yml | 30 ------------------------- 3 files changed, 13 insertions(+), 74 deletions(-) rename .github/workflows/{build.yml => ci.yml} (61%) delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/build.yml b/.github/workflows/ci.yml similarity index 61% rename from .github/workflows/build.yml rename to .github/workflows/ci.yml index 9390bb5c..97fe7e9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build CI +name: CI on: push: branches: @@ -15,6 +15,8 @@ jobs: node-version: [14.x] steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: @@ -23,7 +25,16 @@ jobs: run: npm ci - name: npm run build run: npm run build - docker: + - name: npm run lint + run: npm run lint + - name: npm test + run: npm test + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + build-docker: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -34,16 +45,3 @@ jobs: run: | cd docker make SUBMODULES_INIT=false - sonarcloud: - name: SonarCloud - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index d49773ca..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Lint CI - -on: - # push: - # branches: - # - master - pull_request: - types: [opened, synchronize, reopened] - branches: - - master - -jobs: - lint: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - name: npm install - run: npm ci - - name: npm run lint - run: npm run lint diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 4089d4c2..00000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Unit Tests CI - -on: - push: - branches: - - master - pull_request: - types: [opened, synchronize, reopened] - branches: - - master - -jobs: - unit-tests: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - name: npm install - run: npm ci - # - name: npm run build - # run: npm run build - - name: npm test - run: npm test - -- 2.34.1