diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index c5aa7aba..2f7e4ab1 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -1,14 +1,24 @@ name: Build -on: +on: push: branches: - main - develop + paths: + - "angular-client/**" + - "scylla-server/**" + - "compose/**" + - ".github/workflows/build-check.yml" pull_request: branches: - main - develop - 'feature/**' + paths: + - "angular-client/**" + - "scylla-server/**" + - "compose/**" + - ".github/workflows/build-check.yml" jobs: run-build: runs-on: ubuntu-latest @@ -17,14 +27,6 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Set up Docker Compose - run: | - sudo apt-get -y update - sudo apt-get -y install docker-compose - name: Build Docker Compose working-directory: compose - run: | - if ! docker-compose build; then - echo "Docker Compose build failed." - exit 1 # This will cause the workflow to fail - fi + run: docker compose build diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/client-ci.yml similarity index 51% rename from .github/workflows/prettier-check.yml rename to .github/workflows/client-ci.yml index 9e7a961d..7cca63f4 100644 --- a/.github/workflows/prettier-check.yml +++ b/.github/workflows/client-ci.yml @@ -1,17 +1,28 @@ -name: Prettier Check +name: Client CI + on: push: branches: - main - develop + paths: + - "angular-client/**" + - ".github/workflows/client-ci.yml" pull_request: branches: - main - develop - "feature/**" + paths: + - "angular-client/**" + - ".github/workflows/client-ci.yml" + +defaults: + run: + working-directory: angular-client jobs: - run-prettier-check: + lint-and-format: runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -20,12 +31,12 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v6 with: - node-version: 18.17.1 + node-version: 20.17.0 cache: "npm" - cache-dependency-path: ./angular-client/package-lock.json + cache-dependency-path: angular-client/package-lock.json - name: Install modules - working-directory: ./angular-client - run: npm install + run: npm ci + - name: Run linting check + run: npm run lint -- --max-warnings=0 - name: Run prettier check - working-directory: ./angular-client run: npm run prettier-check diff --git a/.github/workflows/lint-check.yml b/.github/workflows/lint-check.yml deleted file mode 100644 index ebafd660..00000000 --- a/.github/workflows/lint-check.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Linting Check -on: - push: - branches: - - main - - develop - pull_request: - branches: - - main - - develop - - "feature/**" - -jobs: - run-linting-check: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: 20.17.0 - cache: "npm" - cache-dependency-path: ./angular-client/package-lock.json - - name: Install modules - working-directory: ./angular-client - run: npm install - - name: Run linting check - working-directory: ./angular-client - run: npm run lint --max-warnings=0 diff --git a/.github/workflows/scylla-ci.yml b/.github/workflows/scylla-ci.yml index 3a059c71..2acf1d1f 100644 --- a/.github/workflows/scylla-ci.yml +++ b/.github/workflows/scylla-ci.yml @@ -5,11 +5,17 @@ on: branches: - main - develop + paths: + - "scylla-server/**" + - ".github/workflows/scylla-ci.yml" pull_request: branches: - main - develop - 'feature/**' + paths: + - "scylla-server/**" + - ".github/workflows/scylla-ci.yml" defaults: