|
| 1 | +--- |
| 2 | +name: Unit test common |
| 3 | + |
| 4 | +# |
| 5 | +# Documentation: |
| 6 | +# https://help.github.com/en/articles/workflow-syntax-for-github-actions |
| 7 | +# |
| 8 | + |
| 9 | +############################# |
| 10 | +# Start the job on all push # |
| 11 | +############################# |
| 12 | +on: [push, pull_request] |
| 13 | + |
| 14 | +############### |
| 15 | +# Set the Job # |
| 16 | +############### |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + # Name the Job |
| 20 | + name: Unit common/ Code Base |
| 21 | + # Set the agent to run on |
| 22 | + runs-on: ubuntu-latest |
| 23 | + |
| 24 | + ################## |
| 25 | + # Load all steps # |
| 26 | + ################## |
| 27 | + steps: |
| 28 | + ########################## |
| 29 | + # Checkout the code base # |
| 30 | + ########################## |
| 31 | + - name: Checkout Code |
| 32 | + uses: actions/checkout@v3 |
| 33 | + with: |
| 34 | + # Full git history is needed to get a proper list of changed files within `super-linter` |
| 35 | + fetch-depth: 0 |
| 36 | + - name: Setup helm |
| 37 | + uses: azure/setup-helm@v3 |
| 38 | + # with: |
| 39 | + # version: '<version>' # default is latest stable |
| 40 | + id: install |
| 41 | + |
| 42 | + ################################ |
| 43 | + # Run Linter against code base # |
| 44 | + ################################ |
| 45 | + # - name: Lint Code Base |
| 46 | + # uses: github/super-linter@v4 |
| 47 | + # env: |
| 48 | + # VALIDATE_ALL_CODEBASE: false |
| 49 | + # DEFAULT_BRANCH: main |
| 50 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 51 | + - name: Run make test |
| 52 | + run: | |
| 53 | + make test |
| 54 | +
|
| 55 | + - name: Run make helmlint |
| 56 | + run: | |
| 57 | + make helmlint |
| 58 | +
|
| 59 | + - name: Run make helm kubeconform |
| 60 | + run: | |
| 61 | + curl -L -O https://github.com/yannh/kubeconform/releases/download/v0.4.13/kubeconform-linux-amd64.tar.gz |
| 62 | + tar xf kubeconform-linux-amd64.tar.gz |
| 63 | + sudo mv -v kubeconform /usr/local/bin |
| 64 | + make kubeconform |
0 commit comments