diff --git a/.github/workflows/ci-client.yml b/.github/workflows/ci-client.yml new file mode 100644 index 00000000..3d946bb3 --- /dev/null +++ b/.github/workflows/ci-client.yml @@ -0,0 +1,51 @@ +name: "CI (Client)" +on: + pull_request: + branches: + - main + types: + - opened + - synchronize + - reopened + push: + branches: + - main + workflow_dispatch: + +env: + CI: '' +jobs: + ci: + name: Build on Node + runs-on: ubuntu-latest + strategy: + matrix: + node: [ 14, 16, 18 ] + steps: + - name: checkout@v4 + uses: actions/checkout@v4 + + - name: Use Node ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install and Build + run: | + npm install + npm run build + working-directory: cadio-web/src/main/webapp diff --git a/.github/workflows/ci-server.yml b/.github/workflows/ci-server.yml new file mode 100644 index 00000000..71d24a93 --- /dev/null +++ b/.github/workflows/ci-server.yml @@ -0,0 +1,40 @@ +name: "CI (Server)" + +on: + pull_request: + branches: + - main + types: + - opened + - synchronize + - reopened + push: + branches: + - main + workflow_dispatch: + +jobs: + ci: + name: Build on Cassandra + runs-on: ubuntu-latest + strategy: + matrix: + cassandra-version: [ '4.0', '4.1', '5.0' ] + steps: + - name: checkout@v4 + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: adopt + cache: gradle + timeout-minutes: 3 + + - name: Use Cassandra ${{ matrix.cassandra-version }} + run: docker compose -f "docker/docker-compose-cassandra-${{ matrix.cassandra-version }}.yml" up -d --build --wait + timeout-minutes: 3 + + - name: Build + run: ./gradlew build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0ac3e4c7..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: "CI" - -on: - pull_request: - branches: - - main - types: - - opened - - synchronize - - reopened - push: - branches: - - main - workflow_dispatch: - -jobs: - # TODO: Protocol 변경 필요 -# cassandrda-3_11: -# name: Cassandra 3.11 -# runs-on: ubuntu-latest -# steps: -# - name: checkout@v3 -# uses: actions/checkout@v4 -# -# - name: Set up JDK 21 -# uses: actions/setup-java@v4 -# with: -# java-version: 21 -# distribution: adopt -# cache: gradle -# timeout-minutes: 3 -# -# - name: Setup Docker Containers -# run: docker compose -f "docker/docker-compose-cassandra-3.11.yml" up -d --build --wait -# timeout-minutes: 3 -# -# - name: Build -# run: ./gradlew build - - cassandrda-4_0: - name: Cassandra 4.0 - runs-on: ubuntu-latest - steps: - - name: checkout@v3 - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: 21 - distribution: adopt - cache: gradle - timeout-minutes: 3 - - - name: Setup Docker Containers - run: docker compose -f "docker/docker-compose-cassandra-4.0.yml" up -d --build --wait - timeout-minutes: 3 - - - name: Build - run: ./gradlew build - - cassandrda-4_1: - name: Cassandra 4.1 - runs-on: ubuntu-latest - steps: - - name: checkout@v3 - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: 21 - distribution: adopt - cache: gradle - timeout-minutes: 3 - - - name: Setup Docker Containers - run: docker compose -f "docker/docker-compose-cassandra-4.1.yml" up -d --build --wait - timeout-minutes: 3 - - - name: Build - run: ./gradlew build - - cassandrda-5_0: - name: Cassandra 5.0 - runs-on: ubuntu-latest - steps: - - name: checkout@v3 - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: 21 - distribution: adopt - cache: gradle - timeout-minutes: 3 - - - name: Setup Docker Containers - run: docker compose -f "docker/docker-compose-cassandra-5.0.yml" up -d --build --wait - timeout-minutes: 3 - - - name: Build - run: ./gradlew build diff --git a/.gitignore b/.gitignore index 665ad47d..d91ba040 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ bin/ .idea node_modules/ +**/build/