Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefano.occhi committed May 15, 2023
2 parents 3303bdb + 642543d commit 201bb31
Show file tree
Hide file tree
Showing 8 changed files with 527 additions and 447 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Set update schedule for npm packages

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
target-branch: 'develop'
schedule:
# interval: 'weelkly'
interval: 'daily'
time: '15:20'
timezone: 'Europe/Rome'
ignore:
- dependency-name: '*'
update-types: ['version-update:semver-major']
# Disable all pull requests for npm dependencies
# open-pull-requests-limit: 0
21 changes: 21 additions & 0 deletions .github/workflows/approve-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --no-frozen-lockfile
- name: Build release
run: pnpm build
- name: Bump version with release tag name
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check pipeline

on:
# Run on pull request
pull_request:
branches: [main, develop]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
pull-requests: read

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
analysis:
uses: ./.github/workflows/sonarcloud.yml
secrets: inherit

build:
needs: analysis
uses: ./.github/workflows/build.yml

test:
needs: build
uses: ./.github/workflows/test.yml
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ on:
types: [published]

jobs:
# build
analysis:
uses: ./.github/workflows/sonarcloud.yml
secrets: inherit

build:
needs: analysis
uses: ./.github/workflows/build.yml

test:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SonarCloud analysis

on:
workflow_call:

jobs:
sonarcloud:
runs-on: ubuntu-latest

steps:
- name: Analyze with SonarCloud

# You can pin the exact commit or the version.
# uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
with:
# Additional arguments for the sonarcloud scanner
args:
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
# mandatory
-Dsonar.projectKey=volverjs_auth-vue
-Dsonar.organization=volverjs
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --no-frozen-lockfile
- name: Build release
run: pnpm build
- name: Run Vitest test
Expand Down
Loading

0 comments on commit 201bb31

Please # to comment.