test(unit): setup jest, add tests + gh workflow #89
Workflow file for this run
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
# Copyright 2022 Chainguard, Inc. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: 🐶 reviewdog | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: reviewdog/action-eslint@v1 | |
with: | |
reporter: github-check | |
eslint_flags: "src/" | |
action-lint: | |
name: Action lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Find yamls | |
id: get_yamls | |
run: | | |
yamls=$(find .github -name "*.y*ml" | grep -v dependabot.) | |
echo "::set-output name=files::${yamls}" | |
- name: Action lint | |
uses: reviewdog/action-actionlint@v1 | |
with: | |
actionlint_flags: ${{ steps.get_yamls.outputs.files }} | |
spacing: | |
name: Spacing | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chainguard-dev/actions/trailing-space@main | |
- uses: chainguard-dev/actions/eof-newline@main | |
donotsubmit: | |
name: Do not submit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chainguard-dev/actions/donotsubmit@main |