-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.5 KB
/
test-lint.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
# GENERATED: This file is automatically updated by 'Bump dependencies', local changes will be overwritten!
name: 'Test & lint'
on:
push:
branches:
- 'main'
- 'master'
pull_request:
workflow_dispatch:
jobs:
checks:
name: Test & lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read config
id: conf
run: |
echo "STRICT::$([ "$(jq '.test_lint' -r ci-conf.json)" != false ] && [ "$(jq '.test_lint.lint_strict' -r ci-conf.json)" != false ] && echo 1 || echo 0)" | tee -a $GITHUB_OUTPUT
echo "TEST::$([ "$(jq '.test_lint' -r ci-conf.json)" != false ] && [ "$(jq '.test_lint.test' -r ci-conf.json)" != false ] && echo 1 || echo 0)" | tee -a $GITHUB_OUTPUT
echo "LINT::$([ "$(jq '.test_lint' -r ci-conf.json)" != false ] && [ "$(jq '.test_lint.lint' -r ci-conf.json)" != false ] && echo 1 || echo 0)" | tee -a $GITHUB_OUTPUT
echo "FMT::$([ "$(jq '.test_lint' -r ci-conf.json)" != false ] && [ "$(jq '.test_lint.fmt' -r ci-conf.json)" != false ] && echo 1 || echo 0)" | tee -a $GITHUB_OUTPUT
- name: Run test, lint, fmt
uses: docker/build-push-action@v2
with:
file: ./ci/test-lint.Dockerfile
context: .
build-args: |
STRICT=${{ steps.conf.outputs.STRICT }}
TEST=${{ steps.conf.outputs.TEST }}
LINT=${{ steps.conf.outputs.LINT }}
FMT=${{ steps.conf.outputs.FMT }}
push: false