forked from axoflow/axosyslog
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.13 KB
/
package-indexer-checks.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
name: Package indexer checks
on:
pull_request:
paths:
- "packaging/package-indexer/**"
- ".github/workflows/package-indexer-checks.yml"
push:
paths:
- "packaging/package-indexer/**"
- ".github/workflows/package-indexer-checks.yml"
defaults:
run:
working-directory: packaging/package-indexer
jobs:
package-indexer-checks:
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: package-indexer
DOCKER_CONTAINER_NAME: package_indexer_container
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Build docker image
run: |
docker build -t ${DOCKER_IMAGE} .
- name: Start docker container
run: |
docker run -v $PWD:$PWD -w $PWD --detach --name ${DOCKER_CONTAINER_NAME} -t ${DOCKER_IMAGE}
- name: style-check
run: |
docker exec ${DOCKER_CONTAINER_NAME} pip install black
docker exec ${DOCKER_CONTAINER_NAME} black --check --diff .
- name: linter
run: |
docker exec ${DOCKER_CONTAINER_NAME} pip install mypy
docker exec ${DOCKER_CONTAINER_NAME} mypy .