Merge branch 'main' of https://git.targo.ca/Targo/targo_frontend into release/nicolas/v1.1
This commit is contained in:
commit
40d4105f7b
|
|
@ -4,14 +4,21 @@ name: Node-CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'docs/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
lint:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Gitea Checkout
|
- name: Gitea Checkout
|
||||||
|
|
@ -29,21 +36,76 @@ jobs:
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: npm test
|
|
||||||
|
|
||||||
alert_on_failure:
|
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
#if: ${{ needs.test.result == 'failure' }}
|
|
||||||
steps:
|
|
||||||
- name: Notify Google Chat
|
- name: Notify Google Chat
|
||||||
if: ${{ always() }} # Use always to ensure that the notification is also send on failure of former steps
|
if: ${{ failure() }} # Use always to ensure that the notification is also send on failure of former steps
|
||||||
uses: SimonScholz/google-chat-action@3b3519e5102dba8aa5046fd711c4b553586409bb # v1.1.0
|
uses: SimonScholz/google-chat-action@3b3519e5102dba8aa5046fd711c4b553586409bb # v1.1.0
|
||||||
with:
|
with:
|
||||||
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}'
|
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}'
|
||||||
jobStatus: ${{ job.status }}
|
jobStatus: ${{ job.status }}
|
||||||
title: Google Chat GitHub Action
|
title: Lint failed
|
||||||
subtitle: ${{ job.status }}
|
|
||||||
createDefaultSection: false
|
test:
|
||||||
collapsibleDefaultSection: false
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Gitea Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: Notify Google Chat
|
||||||
|
if: ${{ failure() }} # Use always to ensure that the notification is also send on failure of former steps
|
||||||
|
uses: SimonScholz/google-chat-action@3b3519e5102dba8aa5046fd711c4b553586409bb # v1.1.0
|
||||||
|
with:
|
||||||
|
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}'
|
||||||
|
jobStatus: ${{ job.status }}
|
||||||
|
title: Test failed
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Gitea Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Notify Google Chat
|
||||||
|
if: ${{ failure() }} # Use always to ensure that the notification is also send on failure of former steps
|
||||||
|
uses: SimonScholz/google-chat-action@3b3519e5102dba8aa5046fd711c4b553586409bb # v1.1.0
|
||||||
|
with:
|
||||||
|
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}'
|
||||||
|
jobStatus: ${{ job.status }}
|
||||||
|
title: Build failed
|
||||||
|
|
||||||
|
#- name: deploy
|
||||||
|
# if: ${{ success() }}
|
||||||
|
# run: docker build -t targo_frontend .
|
||||||
|
|
||||||
|
#deploy:
|
||||||
|
# needs: [lint, test, build]
|
||||||
|
# runs-on: ubuntu-24.04
|
||||||
|
# if: github.ref == 'refs/heads/main'
|
||||||
|
# permissions:
|
||||||
|
# contents: read
|
||||||
|
# id-token: write
|
||||||
|
# steps:
|
||||||
|
# - run: docker build -t targo_frontend .
|
||||||
Loading…
Reference in New Issue
Block a user