Add a separated workflow fro lint #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Lint | |
on: [push] | |
jobs: | |
lint-c: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: docker/setup-buildx-action@v2 | |
- name: check if tags are correct | |
run: | | |
make check-tags | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ".docker/lint/c-lint.Dockerfile" | |
tags: c-lint:latest | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false | |
- name: Run Pytest | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: c-lint:latest | |
options: -v $$(pwd):/code |