-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.43 KB
/
unit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Run all tests, linters, code analysis and other QA tasks on
# every push to master and PRs.
#
# To SSH into the runner to debug a failure, add the following step before
# the failing step
# - uses: mxschmitt/action-tmate@v3
# with:
# install-dependencies: false
name: Unit Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
# Prevent multiple jobs running after fast subsequent pushes
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
dependabot:
needs: [test]
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- id: metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: |
gh pr review --approve "$PR_URL"
gh pr merge --squash --auto "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
test:
name: Tests
runs-on: namespace-profile-pareto-linux
steps:
- uses: namespacelabs/nscloud-checkout-action@v5
- uses: ./.github/actions/devenv
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: devenv test -d