Skip to content

Commit

Permalink
GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Oct 17, 2024
1 parent f126619 commit d1b53a4
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /coverage
schedule:
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /coverage
schedule:
interval: weekly
groups:
npm-development:
dependency-type: development
update-types:
- minor
- patch
npm-production:
dependency-type: production
update-types:
- patch

- package-ecosystem: github-actions
directory: /fmt
schedule:
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /fmt
schedule:
interval: weekly
groups:
npm-development:
dependency-type: development
update-types:
- minor
- patch
npm-production:
dependency-type: production
update-types:
- patch
58 changes: 58 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: coverage

on:
workflow_dispatch:
push:
paths:
- coverage/**
branches:
- main
pull_request:
paths:
- coverage/**

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: coverage/.node-version
cache: npm
cache-dependency-path: coverage/package-lock.json

- name: Install Dependencies
id: install
working-directory: ./coverage
run: npm ci

- name: Build dist/ Directory
id: build
working-directory: ./coverage
run: npm run package

- name: Compare Directories
id: diff
working-directory: ./coverage
run: |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
# - name: Test
# id: npm-ci-test
# working-directory: ./coverage
# run: npm run ci-test
58 changes: 58 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: fmt

on:
workflow_dispatch:
push:
paths:
- fmt/**
branches:
- main
pull_request:
paths:
- fmt/**

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: fmt/.node-version
cache: npm
cache-dependency-path: fmt/package-lock.json

- name: Install Dependencies
id: install
working-directory: ./fmt
run: npm ci

- name: Build dist/ Directory
id: build
working-directory: ./fmt
run: npm run package

- name: Compare Directories
id: diff
working-directory: ./fmt
run: |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
# - name: Test
# id: npm-ci-test
# working-directory: ./fmt
# run: npm run ci-test

0 comments on commit d1b53a4

Please sign in to comment.