Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Provided unit tests and simple CI for fields #2

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Node.js Package
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/[email protected]
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@rapid-d9t'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: db-csv-faker

on: [ push, pull_request ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: npm i --also=dev
- name: Build
run: npm run build

unit-test:
name: Unit Tests
needs: build

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run Tests
run: npm run test

rust-lint:
name: Rust Lint

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
rustup component add rustfmt
rustfmt --version
- name: Rust Lint
run: rustfmt ./src/lib.rs --check

code-scan:
name: Code Scan

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Perform Scan
uses: ShiftLeftSecurity/scan-action@master
env:
WORKSPACE: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCAN_AUTO_BUILD: true
with:
output: reports

- name: Upload report
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: reports
Loading