|
3 | 3 |
|
4 | 4 | on: push
|
5 | 5 | jobs:
|
6 |
| - test: |
7 |
| - name: Test and try publishing Python package |
8 |
| - runs-on: ubuntu-latest |
9 |
| - steps: |
10 |
| - - name: Checkout master |
11 |
| - uses: actions/checkout@master |
12 |
| - |
13 |
| - - name: Set up Python |
14 |
| - uses: actions/setup-python@v2 |
15 |
| - with: |
16 |
| - python-version: 3.8 |
17 |
| - |
18 |
| - - name: Install flit |
19 |
| - run: | |
20 |
| - python -m pip install --upgrade pip |
21 |
| - pip install flit |
22 |
| -
|
23 |
| - - name: Install package |
24 |
| - run: flit install |
25 |
| - |
26 |
| - - name: run tests |
27 |
| - run: pytest record_api/test.py |
28 |
| - env: |
29 |
| - PYTEST_DISABLE_PLUGIN_AUTOLOAD: true |
30 |
| - - name: Try publishing to PyPi |
31 |
| - run: flit publish |
32 |
| - continue-on-error: true |
33 |
| - env: |
34 |
| - FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} |
35 |
| - FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
36 | 6 | build:
|
37 |
| - needs: test |
38 |
| - name: Build and push Docker images |
| 7 | + name: Build, test and push Docker images |
39 | 8 | runs-on: ubuntu-latest
|
40 | 9 | steps:
|
41 | 10 | - name: Checkout master
|
|
62 | 31 | curl https://github.com/argoproj/argo/releases/download/v2.9.3/argo-linux-amd64 -L -o $GITHUB_WORKSPACE/bin/argo
|
63 | 32 | - name: Make bin executable
|
64 | 33 | run: chmod +x $GITHUB_WORKSPACE/bin/*
|
65 |
| - - name: Verify argo |
66 |
| - run: argo |
| 34 | + - name: Cache pip |
| 35 | + uses: actions/cache@v2 |
| 36 | + with: |
| 37 | + path: ~/.cache/pip |
| 38 | + key: pip-${{ hashFiles('pyproject.toml') }} |
| 39 | + restore-keys: | |
| 40 | + pip- |
| 41 | +
|
67 | 42 | - name: Install flit
|
68 | 43 | run: |
|
69 | 44 | python -m pip install --upgrade pip
|
@@ -107,6 +82,18 @@ jobs:
|
107 | 82 | working-directory: ./k8
|
108 | 83 | run: make buildx-driver
|
109 | 84 |
|
| 85 | + - name: run tests |
| 86 | + run: pytest record_api/test.py |
| 87 | + env: |
| 88 | + PYTEST_DISABLE_PLUGIN_AUTOLOAD: true |
| 89 | + |
| 90 | + - name: Try publishing to PyPi |
| 91 | + run: flit publish |
| 92 | + continue-on-error: true |
| 93 | + env: |
| 94 | + FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} |
| 95 | + FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
| 96 | + |
110 | 97 | - name: Push images
|
111 | 98 | working-directory: ./k8
|
112 | 99 | run: make push-images
|
|
0 commit comments