Updated CAdvisor version #528
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - develop | |
| workflow_dispatch: | |
| jobs: | |
| build-and-run-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v1 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Set-up s5cmd | |
| uses: peak/action-setup-s5cmd@main | |
| with: | |
| version: v2.0.0 | |
| - name: Setup environment and prepare dir | |
| run: | | |
| sudo mkdir -p tests/mock_data | |
| sudo chown -R runner:runner tests/mock_data | |
| s5cmd --no-sign-request --endpoint-url https://s3.echo.stfc.ac.uk cp "s3://mast/dev/mock_data*" ./tests | |
| pip install --upgrade pip | |
| pip install uv | |
| uv sync | |
| - name: Build and run containers | |
| run: | | |
| docker compose \ | |
| --env-file dev/docker/.env.dev \ | |
| -f dev/docker/docker-compose.yml \ | |
| up \ | |
| --build \ | |
| -d | |
| - name: Run tests | |
| run: | | |
| uv run pytest -rs | |
| ruff-code-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Ruff | |
| run: pip install ruff | |
| - name: Run Ruff with relevent standards | |
| run: ruff check --select E4,E7,E9,F,I |