Skip to content

remove unecessary ts-ignore #1818

remove unecessary ts-ignore

remove unecessary ts-ignore #1818

---
name: build, push to registry and tests
on:
push:
branches-ignore:
- "development/**"
env:
NAMESPACE: "scality/zenko-ui/dev"
REGISTRY: "ghcr.io"
jobs:
oras:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Oras
run: |
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz
mkdir -p oras-install/
sudo tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C /usr/local/bin oras
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/
env:
ORAS_VERSION: "0.12.0"
- name: Oras login
run: oras login --username "${LOGIN}" --password "${PASSWORD}" ${REGISTRY}
env:
LOGIN: "${{ github.actor }}"
PASSWORD: "${{ github.token }}"
- name: push nginx and runtime-app-configuration
run: |
oras push ${REGISTRY}/${NAMESPACE}/zenko-ui-config:${{ github.sha }} \
runtime-app-configuration.gotempl:application/zenko-ui-runtime-config-template+json \
nginx.conf.gotempl:text/nginx-conf-template
build:
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: "20"
cache: "npm"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies
run: npm ci
- name: build assets
run: npm run build
- name: Build and push zenko ui
uses: docker/[email protected]
with:
push: true
context: .
tags: |
${{env.REGISTRY}}/${{env.NAMESPACE}}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: "20"
cache: "npm"
- name: install dependencies
run: npm ci
- name: run eslint test
run: npm run test:lint
- name: run test suite
run: npm run test:coverage
- name: code coverage
uses: codecov/[email protected]