diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index f4ad54d..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: UI CI - -on: - pull_request: - branches: - - main - push: - branches: - - main - -jobs: - lint: - runs-on: ubuntu-22.04 - name: Lint - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18' - - run: yarn - - run: yarn lint - build: - runs-on: ubuntu-22.04 - needs: lint - name: Build - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18' - - run: yarn - - run: yarn build - test: - runs-on: ubuntu-22.04 - needs: build - name: Test - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18' - - run: yarn - - run: yarn test diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0254986 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,15 @@ +name: Deploy + +on: + push: + branches: ['main'] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: docker build --build-arg ENV=development -t mustafaeligere/dockersample:latest . + - run: echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin + - run: docker push docker push mustafaeligere/dockersample:latest diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..6a3063c --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,48 @@ +name: Integration + +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: 'Installing Dependencies' + run: npm i + + - name: 'Build command' + run: npm run build + + unit-tests: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: 'Installing Dependencies' + run: npm i + + - name: 'Running test cases' + run: npm run test diff --git a/src/main.tsx b/src/main.tsx index 05769a6..7d88b04 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -17,7 +17,7 @@ createRoot(document.getElementById('root') as HTMLElement).render(