|
1 | 1 | name: CI/CD
|
| 2 | + |
2 | 3 | on: [push, pull_request]
|
3 | 4 |
|
4 | 5 | jobs:
|
|
9 | 10 | python-version: ["3.12"]
|
10 | 11 |
|
11 | 12 | steps:
|
12 |
| - - uses: actions/checkout@v3 |
13 |
| - #- uses: psf/black@stable |
14 |
| - |
15 |
| - - name: Set up Python ${{ matrix.python-version }} |
16 |
| - uses: actions/setup-python@v3 |
17 |
| - with: |
18 |
| - python-version: ${{ matrix.python-version }} |
| 13 | + - name: Checkout code |
| 14 | + uses: actions/checkout@v3 |
| 15 | + |
| 16 | + - name: Set up Python ${{ matrix.python-version }} |
| 17 | + uses: actions/setup-python@v3 |
| 18 | + with: |
| 19 | + python-version: ${{ matrix.python-version }} |
19 | 20 |
|
20 |
| - - name: Cache dependencies |
21 |
| - uses: actions/cache@v3 |
22 |
| - with: |
23 |
| - path: ~/.cache/pip |
24 |
| - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
25 |
| - restore-keys: | |
26 |
| - ${{ runner.os }}-pip- |
| 21 | + - name: Cache dependencies |
| 22 | + uses: actions/cache@v3 |
| 23 | + with: |
| 24 | + path: ~/.cache/pip |
| 25 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| 26 | + restore-keys: | |
| 27 | + ${{ runner.os }}-pip- |
27 | 28 |
|
28 |
| - - name: Install dependencies |
29 |
| - run: | |
30 |
| - make install |
| 29 | + - name: Install dependencies |
| 30 | + run: make install |
31 | 31 |
|
32 |
| - # - name: Run code formatting check |
33 |
| - # run: | |
34 |
| - # make format |
| 32 | + # Uncomment these steps if you need to run code formatting and linting |
| 33 | + # - name: Run code formatting check |
| 34 | + # run: make format |
35 | 35 |
|
36 |
| - # - name: Run linting |
37 |
| - # run: | |
38 |
| - # make lint |
| 36 | + # - name: Run linting |
| 37 | + # run: make lint |
39 | 38 |
|
40 |
| - # - name: Lint Dockerfiles |
41 |
| - # run: | |
42 |
| - # docker run --rm -i hadolint/hadolint < Dockerfile.app |
43 |
| - # docker run --rm -i hadolint/hadolint < Dockerfile.ollama |
| 39 | + # - name: Lint Dockerfiles |
| 40 | + # run: | |
| 41 | + # docker run --rm -i hadolint/hadolint < Dockerfile.app |
| 42 | + # docker run --rm -i hadolint/hadolint < Dockerfile.ollama |
44 | 43 |
|
45 |
| - - name: Install Docker Compose |
46 |
| - run: | |
47 |
| - sudo apt-get update |
48 |
| - sudo apt-get install -y docker-compose |
| 44 | + - name: Install Docker Compose |
| 45 | + run: | |
| 46 | + sudo apt-get update |
| 47 | + sudo apt-get install -y docker-compose |
49 | 48 |
|
50 |
| - - name: Build Docker images |
51 |
| - env: |
52 |
| - AT_USERNAME: ${{ secrets.AT_USERNAME }} |
53 |
| - AT_API_KEY: ${{ secrets.AT_API_KEY }} |
54 |
| - run: | |
55 |
| - make docker_run |
| 49 | + - name: Build and run Docker containers |
| 50 | + env: |
| 51 | + AT_USERNAME: ${{ secrets.AT_USERNAME }} |
| 52 | + AT_API_KEY: ${{ secrets.AT_API_KEY }} |
| 53 | + run: make docker_run |
56 | 54 |
|
57 |
| - - name: Cleanup Docker resources |
58 |
| - run: | |
59 |
| - docker-compose down --remove-orphans |
| 55 | + - name: Cleanup Docker resources |
| 56 | + run: docker-compose down --remove-orphans |
0 commit comments