update with final project release result #225
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: Deep CNCF CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
license: | |
if: github.repository == 'amosproj/amos2024ss08-cloud-native-llm' # Don't do this in forks | |
name: License check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install Python Dependencies | |
run: pip install -r requirements.txt | |
- name: Check copyright | |
id: license_check_report | |
uses: pilosus/action-pip-license-checker@v2 | |
with: | |
requirements: "./requirements.txt" | |
fail: "StrongCopyleft,Error" | |
- name: Print copyright report | |
run: echo "${{ steps.license_check_report.outputs.report }}" | |
lint: | |
needs: license | |
name: Lint check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install Pylint | |
run: pip install pylint | |
- name: Run linter | |
run: pylint src || true | |
build: | |
needs: lint | |
if: github.repository == 'amosproj/amos2024ss08-cloud-native-llm' # Don't do this in forks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Run tests | |
run: python -m unittest discover -p *_test.py |