Update mitre_attack.svg #232
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
permissions: | |
contents: read | |
id-token: write | |
pages: write | |
on: | |
push: | |
branches: ['master'] | |
pull_request: | |
branches: ['master'] | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
# Allow one concurrent deployment | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
**/node_modules | |
~/.npm | |
dist | |
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | |
- name: Set Node v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
registry-url: https://registry.npmjs.org/ | |
- name: Set NPM version | |
run: npm i -g npm@8 | |
- name: Install dependencies | |
run: npm ci | |
- name: Generate dist | |
run: npm run dist | |
lint: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use node modules cache | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
**/node_modules | |
~/.npm | |
dist | |
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | |
- name: Run Eslint | |
run: npm run lint | |
unit-test: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use node modules cache | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
**/node_modules | |
~/.npm | |
dist | |
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | |
- name: Run Jest | |
run: npm run test | |
mutation-test: | |
needs: [unit-test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use node modules cache | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
**/node_modules | |
~/.npm | |
dist | |
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | |
- name: Setup results folder | |
run: mkdir mutation-test-results | |
- name: Execute Stryker | |
run: npm run stryker | |
- name: Post Stryker | |
run: | | |
cd mutation-test-results | |
cp /home/runner/work/genesys-icons/genesys-icons/reports/mutation/mutation.html stryker-report.html | |
cd .. | |
- name: Upload artifact with results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mutation-test-results | |
path: mutation-test-results | |
deploy: | |
needs: [lint, unit-test] | |
if: github.ref == 'refs/heads/master' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use node modules cache | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
**/node_modules | |
~/.npm | |
dist | |
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | |
- name: Build Storybook | |
run: npm run build-storybook | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './storybook-static' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |