[14.0][FEAT] cloc Implementation #962
This file contains hidden or 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: test | |
| on: | |
| pull_request: | |
| branches: | |
| - "14.0*" | |
| push: | |
| branches: | |
| - "14.0" | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: --all-files --show-diff-on-failure --color=always | |
| env: | |
| SKIP: oca-gen-addon-readme | |
| - name: Check that all files generated by pre-commit are in git | |
| run: | | |
| newfiles="$(git ls-files --others --exclude-from=.gitignore)" | |
| if [ "$newfiles" != "" ] ; then | |
| echo "Please check-in the following files:" | |
| echo "$newfiles" | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Detect unreleased dependencies | |
| run: | | |
| for reqfile in requirements.txt test-requirements.txt ; do | |
| if [ -f ${reqfile} ] ; then | |
| result=0 | |
| # reject non-comment lines that contain a / (i.e. URLs, relative paths) | |
| grep "^[^#].*/" ${reqfile} || result=$? | |
| if [ $result -eq 0 ] ; then | |
| echo "Unreleased dependencies found in ${reqfile}." | |
| exit 1 | |
| fi | |
| fi | |
| done | |
| - name: Build CI image | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GLODOUK_ENTERPRISE_GITHUB_TOKEN }} | |
| run: | | |
| docker compose -f .ci/docker-compose.yaml build --build-arg GITHUB_TOKEN="$GITHUB_TOKEN" | |
| - name: Run CI | |
| run: | | |
| docker compose -f .ci/docker-compose.yaml up --exit-code-from odoo |