From d839eecdfd7eb1080799adc7b38f42da83223dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:06:52 +0100 Subject: [PATCH 1/7] Setup ci --- .github/workflows/ci.yml | 19 ++++++++++ .github/workflows/testing.yml | 68 +++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f60b2afc8..6fcd7e9df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,25 @@ permissions: pull-requests: write jobs: + install_dependencies: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.42 + + - name: Install dependencies + run: bun install --frozen-lockfile + + unit_tests: + + + test: name: Run Tests runs-on: ubuntu-latest diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 000000000..15a49ff7f --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,68 @@ +name: Bun Pipeline + +on: + push: + pull_request: + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.42 + + - name: Install Dependencies + run: bun install --frozen-lockfile + + check-all: + needs: setup + runs-on: ubuntu-latest + steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# +# - name: Install Bun +# run: | +# curl -fsSL https://bun.sh/install | bash +# export PATH="/home/runner/.bun/bin:$PATH" + + - name: Run Formatting, Linting, and Type Checking + run: bun run check-all + + playwright-tests: + needs: setup + runs-on: ubuntu-latest + steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# +# - name: Install Bun +# run: | +# curl -fsSL https://bun.sh/install | bash +# export PATH="/home/runner/.bun/bin:$PATH" + + - name: Install Playwright Browsers + run: bunx playwright install --with-deps + + - name: Run Playwright Tests + run: bun run test:e2e + + unit-tests: + needs: setup + runs-on: ubuntu-latest + steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# +# - name: Install Bun +# run: | +# curl -fsSL https://bun.sh/install | bash +# export PATH="/home/runner/.bun/bin:$PATH" + + - name: Run Unit Tests + run: bun test \ No newline at end of file From e4d198dc0d9fcba2dcc5ab50fe99ba27cfca997f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:09:26 +0100 Subject: [PATCH 2/7] wip --- .github/workflows/testing.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 15a49ff7f..74d9d2282 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -23,8 +23,8 @@ jobs: needs: setup runs-on: ubuntu-latest steps: -# - name: Checkout code -# uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 # # - name: Install Bun # run: | @@ -38,8 +38,8 @@ jobs: needs: setup runs-on: ubuntu-latest steps: -# - name: Checkout code -# uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 # # - name: Install Bun # run: | @@ -56,8 +56,8 @@ jobs: needs: setup runs-on: ubuntu-latest steps: -# - name: Checkout code -# uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 # # - name: Install Bun # run: | From c8228da9e26fa68c6f68627b71697a9d9aaf1f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:10:44 +0100 Subject: [PATCH 3/7] wip --- .github/workflows/testing.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 74d9d2282..b7a925664 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -25,11 +25,11 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 -# -# - name: Install Bun -# run: | -# curl -fsSL https://bun.sh/install | bash -# export PATH="/home/runner/.bun/bin:$PATH" + + - name: Install Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.42 - name: Run Formatting, Linting, and Type Checking run: bun run check-all @@ -40,11 +40,11 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 -# -# - name: Install Bun -# run: | -# curl -fsSL https://bun.sh/install | bash -# export PATH="/home/runner/.bun/bin:$PATH" + + - name: Install Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.42 - name: Install Playwright Browsers run: bunx playwright install --with-deps @@ -58,11 +58,11 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 -# -# - name: Install Bun -# run: | -# curl -fsSL https://bun.sh/install | bash -# export PATH="/home/runner/.bun/bin:$PATH" + + - name: Install Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.42 - name: Run Unit Tests run: bun test \ No newline at end of file From 1bc75492002cadcf55a3ba62a429076b458b97a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:28:28 +0100 Subject: [PATCH 4/7] wip --- .github/actions/setup-environment/action.yml | 15 +++++ .github/workflows/testing.yml | 68 +++++++------------- 2 files changed, 38 insertions(+), 45 deletions(-) create mode 100644 .github/actions/setup-environment/action.yml diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml new file mode 100644 index 000000000..31fa83113 --- /dev/null +++ b/.github/actions/setup-environment/action.yml @@ -0,0 +1,15 @@ +name: 'Setup Environment' +description: 'Sets up Boardwalk development environment' +runs: + using: composite + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.1.42 + + - name: Install Dependencies + run: bun install --frozen-lockfile diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b7a925664..c14e2ca4b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,68 +1,46 @@ name: Bun Pipeline on: - push: pull_request: jobs: - setup: + code-checks: + name: "Format, Lint, and Types Check" runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Setup Environment + uses: .github/actions/setup-environment - - name: Install Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.1.42 - - - name: Install Dependencies - run: bun install --frozen-lockfile + - name: Run Format, Lint, and Types Check + run: bun run check-all - check-all: - needs: setup + unit-tests: + name: "Unit Tests" runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Setup Environment + uses: .github/actions/setup-environment - - name: Install Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.1.42 - - - name: Run Formatting, Linting, and Type Checking - run: bun run check-all + - name: Run Unit Tests + run: bun test - playwright-tests: - needs: setup + e2e-tests: + name: "E2E Tests" + timeout-minutes: 5 runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.1.42 + - name: Setup Environment + uses: .github/actions/setup-environment - name: Install Playwright Browsers run: bunx playwright install --with-deps - - name: Run Playwright Tests + - name: Run E2E Tests run: bun run test:e2e - unit-tests: - needs: setup - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Bun - uses: oven-sh/setup-bun@v2 + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} with: - bun-version: 1.1.42 - - - name: Run Unit Tests - run: bun test \ No newline at end of file + name: playwright-report + path: playwright-report/ + retention-days: 30 \ No newline at end of file From e08eec0849a7f2eae3c3c302e06969a55811a867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:43:31 +0100 Subject: [PATCH 5/7] wip --- .github/workflows/ci.yml | 63 +++++++++++++++----------------- .github/workflows/playwright.yml | 34 ----------------- .github/workflows/testing.yml | 46 ----------------------- 3 files changed, 30 insertions(+), 113 deletions(-) delete mode 100644 .github/workflows/playwright.yml delete mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fcd7e9df..67103b7dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,49 +1,46 @@ -name: CI +name: CI Pipeline on: - push: - branches: [master] pull_request: - branches: [master] - -permissions: - checks: write - pull-requests: write jobs: - install_dependencies: - name: Run Tests + code-checks: + name: "Format, Lint, and Types Check" runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.1.42 - - - name: Install dependencies - run: bun install --frozen-lockfile + - name: Setup Environment + uses: .github/actions/setup-environment - unit_tests: + - name: Run Format, Lint, and Types Check + run: bun run check-all + unit-tests: + name: "Unit Tests" + runs-on: ubuntu-latest + steps: + - name: Setup Environment + uses: .github/actions/setup-environment + - name: Run Unit Tests + run: bun test - test: - name: Run Tests + e2e-tests: + name: "E2E Tests" + timeout-minutes: 5 runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Setup Environment + uses: .github/actions/setup-environment - - name: Install Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.1.42 + - name: Install Playwright Browsers + run: bunx playwright install --with-deps - - name: Install dependencies - run: bun install --frozen-lockfile + - name: Run E2E Tests + run: bun run test:e2e - - name: Run tests - run: bun test \ No newline at end of file + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 29f1d8c0d..000000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.1.42 - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: Install Playwright Browsers - run: bunx playwright install --with-deps - - - name: Run Playwright tests - run: bun run test:e2e - - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index c14e2ca4b..000000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Bun Pipeline - -on: - pull_request: - -jobs: - code-checks: - name: "Format, Lint, and Types Check" - runs-on: ubuntu-latest - steps: - - name: Setup Environment - uses: .github/actions/setup-environment - - - name: Run Format, Lint, and Types Check - run: bun run check-all - - unit-tests: - name: "Unit Tests" - runs-on: ubuntu-latest - steps: - - name: Setup Environment - uses: .github/actions/setup-environment - - - name: Run Unit Tests - run: bun test - - e2e-tests: - name: "E2E Tests" - timeout-minutes: 5 - runs-on: ubuntu-latest - steps: - - name: Setup Environment - uses: .github/actions/setup-environment - - - name: Install Playwright Browsers - run: bunx playwright install --with-deps - - - name: Run E2E Tests - run: bun run test:e2e - - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 \ No newline at end of file From 31b0e9fbe66c679c2de0834b2689926a0b862b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:45:51 +0100 Subject: [PATCH 6/7] fix pipeline issue --- .github/actions/setup-environment/action.yml | 3 --- .github/workflows/ci.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index 31fa83113..4c9137871 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -3,9 +3,6 @@ description: 'Sets up Boardwalk development environment' runs: using: composite steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Install Bun uses: oven-sh/setup-bun@v2 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67103b7dc..ab621fbb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ jobs: name: "Format, Lint, and Types Check" runs-on: ubuntu-latest steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Setup Environment uses: .github/actions/setup-environment @@ -18,6 +21,9 @@ jobs: name: "Unit Tests" runs-on: ubuntu-latest steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Setup Environment uses: .github/actions/setup-environment @@ -29,6 +35,9 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Setup Environment uses: .github/actions/setup-environment From 190e23b133c0b2baec6b05ffa24b00349cfa67f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Boj=C4=8Di=C4=87?= Date: Sun, 29 Dec 2024 00:46:47 +0100 Subject: [PATCH 7/7] wip --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab621fbb2..8fc13223c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: CI Pipeline on: pull_request: + push: jobs: code-checks: