Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Deprecate Terra-front #195

Deprecate Terra-front

Deprecate Terra-front #195

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
release:
types:
- created
pull_request:
env:
SKIP_PREFLIGHT_CHECK: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: ./node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
npm ci --no-audit
- name: Run lint
run: |
npm run lint
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: ./node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
npm ci --no-audit
- name: Run Tests
run: |
npm run coverage
build-package:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: ./node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
npm ci --no-audit
- name: Launch build
run: |
npm run build
- name: Archive package artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: |
/home/runner/work/terra-front/terra-front/dist
deploy-npm:
name: Deploy package to NPM registry
runs-on: ubuntu-latest
needs: [lint, tests, build-package]
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: |
/home/runner/work/terra-front/terra-front/dist
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: ./node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
npm ci --no-audit
- name: Publish to NPMJS
run: npm run publish:ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}