added some github actions w/ burnettk

This commit is contained in:
jasquat 2022-06-09 15:44:58 -04:00
parent e0c007e93e
commit 591727b99b
3 changed files with 65 additions and 0 deletions

18
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: daily
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: daily
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily

View File

@ -0,0 +1,28 @@
name: Dependabot auto-merge
on:
workflow_run:
workflows: ["Tests"]
types:
- completed
permissions:
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event.workflow_run.conclusion == 'success' && github.event_name == 'pull_request' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
# if: ${{contains(steps.metadata.outputs.dependency-names, 'pytest') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
# if: ${{contains(steps.metadata.outputs.dependency-names, 'pytest')}}
# ideally we auto-merge if all checks pass
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

19
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Tests
on:
- push
- pull_request
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Development Code
uses: actions/checkout@v2
- name: Use Node.js 17.x
uses: actions/setup-node@v1
with:
node-version: 17.x
- run: npm install
- run: npm test
- run: npm run build --if-present