From 6950feb12fb59e4bd4bd1a0cf63b4fdcc0c91e20 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 19 Nov 2024 22:03:14 +0800 Subject: [PATCH 1/2] test --- .github/workflows/ci.yml | 44 +------------------------------- tests/git_sync_two_branches.bats | 1 + 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 694904f5..78c1be67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: id: collect-tests run: | # Get all the test files without extension. - echo "matrix=$(cd local_ci/tests && find . -name '*.bats' -not -path '*/libs/*' -exec basename {} .bats ';' | \ + echo "matrix=$(cd local_ci/tests && find . -name 'git_sync_two_branches.bats' -not -path '*/libs/*' -exec basename {} .bats ';' | \ jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT test: @@ -47,16 +47,6 @@ jobs: git config --global user.email "local_ci@moodle.com" git config --global user.name "Local CI" - - name: Setting up DB mysql - uses: moodlehq/mysql-action@v1 - with: - collation server: utf8mb4_bin - mysql version: 8.0 - mysql root password: test - use tmpfs: true - tmpfs size: '1024M' - extra conf: --skip-log-bin - - name: Setting up PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 with: @@ -65,17 +55,6 @@ jobs: tools: composer coverage: none - - name: Configuring node & npm - uses: actions/setup-node@v4 - with: - node-version-file: 'moodle/.nvmrc' - - - name: Installing composer and node stuff - run: | - cd local_ci - composer install - npm install - - name: Setup Bats uses: bats-core/bats-action@2.0.0 with: @@ -137,16 +116,6 @@ jobs: git config --global user.email "local_ci@moodle.com" git config --global user.name "Local CI" - - name: Setting up DB mysql - uses: moodlehq/mysql-action@v1 - with: - collation server: utf8mb4_bin - mysql version: 8.0 - mysql root password: test - use tmpfs: true - tmpfs size: '1024M' - extra conf: --skip-log-bin - - name: Setting up PHP 8.3 uses: shivammathur/setup-php@v2 with: @@ -155,17 +124,6 @@ jobs: tools: composer coverage: none - - name: Configuring node & npm - uses: actions/setup-node@v4 - with: - node-version-file: 'moodle/.nvmrc' - - - name: Installing composer and node stuff - run: | - cd local_ci - composer install - npm install - - name: Setup Bats uses: bats-core/bats-action@2.0.0 with: diff --git a/tests/git_sync_two_branches.bats b/tests/git_sync_two_branches.bats index cacfdd28..0f617013 100755 --- a/tests/git_sync_two_branches.bats +++ b/tests/git_sync_two_branches.bats @@ -80,6 +80,7 @@ teardown() { export target=local_ci_git_sync_main run git_sync_two_branches/git_sync_two_branches.sh + echo $output # Assert result. assert_success From 853036ebf6757bcb9ce37929f70955e250e6d261 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 19 Nov 2024 22:06:45 +0800 Subject: [PATCH 2/2] more --- tests/git_sync_two_branches.bats | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/git_sync_two_branches.bats b/tests/git_sync_two_branches.bats index 0f617013..cacfdd28 100755 --- a/tests/git_sync_two_branches.bats +++ b/tests/git_sync_two_branches.bats @@ -80,7 +80,6 @@ teardown() { export target=local_ci_git_sync_main run git_sync_two_branches/git_sync_two_branches.sh - echo $output # Assert result. assert_success