Add Mirror #13
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: "Test" | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
test: | |
name: "Test" | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Test Local Action" | |
id: test | |
uses: ./ | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
file_globs: README.md | |
- name: "Validate Outputs" | |
run: | | |
echo '${{ steps.test.outputs.results }}' | |
if [ -z '${{ steps.test.outputs.results }}' ];then | |
echo "No Output" | |
exit 1 | |
fi | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup Node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: "ESLint" | |
run: | | |
npm install | |
npm run lint | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup Node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: "Build" | |
run: | | |
npm install | |
npm run build | |
- name: "Verify" | |
run: | | |
git status --porcelain dist/ | |
if [ ! -d "dist" ];then | |
echo "Missing dist directory, run: npm build" | |
exit 1 | |
fi | |
if [ -n "$(git status --porcelain dist)" ];then | |
echo "Build was not run, run: npm build" | |
exit 1 | |
fi |