From 1e32f730e85471a0989dfb51161700cf0668d092 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 31 Jan 2024 15:58:16 +0100 Subject: [PATCH] TEST Signed-off-by: Johannes Schindelin --- .github/workflows/test.yml | 133 ++----------------------------------- 1 file changed, 5 insertions(+), 128 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b21d19d28..b71fed41a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,28 +1,9 @@ name: Build and Test on: - pull_request: push: - branches: - - main - - releases/* jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-node@v1 - with: - node-version: 20.x - - uses: actions/checkout@v3 - - run: npm ci - - run: npm run build - - run: npm run format-check - - run: npm run lint - - run: npm test - - name: Verify no unstaged changes - run: __test__/verify-no-unstaged-changes.sh - test: strategy: matrix: @@ -95,6 +76,11 @@ jobs: - name: Verify sparse checkout run: __test__/verify-sparse-checkout.sh + - name: Verify not disabled sparse checkout + shell: bash + run: set -x && ! ls -l src/git-command-manager.ts + + # Sparse checkout (non-cone mode) # Disabled sparse checkout in existing checkout - name: Disabled sparse checkout uses: ./ @@ -181,112 +167,3 @@ jobs: path: basic - name: Verify basic run: __test__/verify-basic.sh --archive - - test-proxy: - runs-on: ubuntu-latest - container: - image: alpine/git:latest - options: --dns 127.0.0.1 - services: - squid-proxy: - image: ubuntu/squid:latest - ports: - - 3128:3128 - env: - https_proxy: http://squid-proxy:3128 - steps: - # Clone this repo - - name: Checkout - uses: actions/checkout@v3 - - # Basic checkout using git - - name: Checkout basic - uses: ./ - with: - ref: test-data/v2/basic - path: basic - - name: Verify basic - run: __test__/verify-basic.sh - - # Basic checkout using REST API - - name: Remove basic - run: rm -rf basic - - name: Override git version - run: __test__/override-git-version.sh - - name: Basic checkout using REST API - uses: ./ - with: - ref: test-data/v2/basic - path: basic - - name: Verify basic - run: __test__/verify-basic.sh --archive - - test-bypass-proxy: - runs-on: ubuntu-latest - env: - https_proxy: http://no-such-proxy:3128 - no_proxy: api.github.com,github.com - steps: - # Clone this repo - - name: Checkout - uses: actions/checkout@v3 - - # Basic checkout using git - - name: Checkout basic - uses: ./ - with: - ref: test-data/v2/basic - path: basic - - name: Verify basic - run: __test__/verify-basic.sh - - name: Remove basic - run: rm -rf basic - - # Basic checkout using REST API - - name: Override git version - run: __test__/override-git-version.sh - - name: Checkout basic using REST API - uses: ./ - with: - ref: test-data/v2/basic - path: basic - - name: Verify basic - run: __test__/verify-basic.sh --archive - - test-git-container: - runs-on: ubuntu-latest - container: bitnami/git:latest - steps: - # Clone this repo - - name: Checkout - uses: actions/checkout@v3 - with: - path: v3 - - # Basic checkout using git - - name: Checkout basic - uses: ./v3 - with: - ref: test-data/v2/basic - - name: Verify basic - run: | - if [ ! -f "./basic-file.txt" ]; then - echo "Expected basic file does not exist" - exit 1 - fi - - # Verify .git folder - if [ ! -d "./.git" ]; then - echo "Expected ./.git folder to exist" - exit 1 - fi - - # Verify auth token - git config --global --add safe.directory "*" - git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main - - # needed to make checkout post cleanup succeed - - name: Fix Checkout v3 - uses: actions/checkout@v3 - with: - path: v3