From 919d109f941ca376352c213b822b387ed1a352d7 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 15:55:10 +1000 Subject: [PATCH 01/40] chore: version dev tools --- .tool-versions | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..a7615d27b --- /dev/null +++ b/.tool-versions @@ -0,0 +1,3 @@ +bats v1.3.0 +shellcheck 0.7.2 +shfmt 3.3.0 From fd842ad74d654d09f9e86e89094f5b20f0c6a45c Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 15:55:55 +1000 Subject: [PATCH 02/40] ci: extract linting to own worflow --- .github/workflows/lint.yml | 49 ++++++++++++++++++++++++++++++++++++++ lint.sh | 8 ------- release/README.md | 29 ++++++++-------------- 3 files changed, 59 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/lint.yml delete mode 100755 lint.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..6f6199a3a --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,49 @@ +name: Lint + +on: + push: + branches: + - master + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install asdf dependencies + uses: asdf-vm/actions/install@v1 + + - name: Run ShellCheck + run: | + shellcheck -s bash -x \ + asdf.sh \ + release/tag.sh \ + bin/asdf \ + bin/private/asdf-exec \ + lib/utils.bash \ + lib/commands/*.bash \ + completions/*.bash \ + test/test_helpers.bash \ + test/fixtures/dummy_plugin/bin/* + + format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install asdf dependencies + uses: asdf-vm/actions/install@v1 + + - name: List file to shfmt + run: shfmt -f . + + - name: Run shfmt + run: shfmt -d . diff --git a/lint.sh b/lint.sh deleted file mode 100755 index 2e9f7035a..000000000 --- a/lint.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -exec shellcheck -s bash -x \ - asdf.sh lint.sh release/tag.sh \ - bin/asdf bin/private/asdf-exec \ - lib/utils.bash lib/commands/*.bash \ - completions/*.bash \ - test/test_helpers.bash \ - test/fixtures/dummy_plugin/bin/* diff --git a/release/README.md b/release/README.md index 6696df5ec..1eb28f23e 100644 --- a/release/README.md +++ b/release/README.md @@ -1,28 +1,19 @@ # Release README -If you are a user you can ignore everything in this directory. This directory -contains documentation and scripts for preparing and tagging new versions of -asdf and is only used by asdf maintainers. +If you are a user you can ignore everything in this directory. This directory contains documentation and scripts for preparing and tagging new versions of asdf and is only used by asdf maintainers. ## Tagging Release Candidates To tag release candidates -1. Update the CHANGELOG. Make sure it contains an entry for the version you are -tagging as well as a dev version things that come after the tag (e.g. a heading -with the format `-dev`). -2. Run the tests and the linter - `bats test` and `lint.sh`. -3. Run the release script. The new version must be in the format `0.0.0-rc0`. -For example: `release/tag.sh 0.0.0-rc0`. -4. If the release script succeeds, push to GitHub. Make sure to use the correct -remote to push to the official repository + +1. Update the CHANGELOG. Make sure it contains an entry for the version you are tagging as well as a dev version things that come after the tag (e.g. a heading with the format `-dev`) +2. Run the tests and the linter - `bats test` +3. Run the release script. The new version must be in the format `0.0.0-rc0`. For example: `release/tag.sh 0.0.0-rc0` +4. If the release script succeeds, push to GitHub. Make sure to use the correct remote to push to the official repository ## Tagging Releases -1. Update the CHANGELOG. Make sure it contains an entry for the version you are -tagging as well as a dev version things that come after the tag (e.g. a heading -with the format `-dev`). -2. Run the tests and the linter - `bats test` and `lint.sh`. -3. Run the release script. The new version must be in the format `0.0.0`. For -example: `release/tag.sh 0.0.0`. -4. If the release script succeeds, push to GitHub. Make sure to use the correct -remote to push to the official repository +1. Update the CHANGELOG. Make sure it contains an entry for the version you are tagging as well as a dev version things that come after the tag (e.g. a heading with the format `-dev`) +2. Run the tests and the linter - `bats test` +3. Run the release script. The new version must be in the format `0.0.0`. For example: `release/tag.sh 0.0.0` +4. If the release script succeeds, push to GitHub. Make sure to use the correct remote to push to the official repository From b13588bf533c38f1bcc331bfe4e280ca74bdfa9d Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 15:56:43 +1000 Subject: [PATCH 03/40] ci: used asdf in tests. use wsl on windows runner --- .github/workflows/test.yml | 101 +++++++++++++++++++++++++++++++++ .github/workflows/workflow.yml | 88 ---------------------------- 2 files changed, 101 insertions(+), 88 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..ba7120222 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,101 @@ +name: Tests + +on: + push: + branches: + - master + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +jobs: + test-windows-wsl: + strategy: + fail-fast: true + matrix: + os: + - windows-2016 + - windows-2019 + shells: + - Debian + - Ubuntu-20.04 + - Ubuntu-18.04 + # - Alpine + # - kali-linux + # - openSUSE-Leap-15.2 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup WSL & install test dependencies + uses: Vampire/setup-wsl@v1 + with: + distribution: ${{ matrix.shells }} + additional-packages: curl git fish + + - name: Install asdf dependencies + uses: asdf-vm/actions/install@v1 + + - name: Run tests + run: bats test + env: + GITHUB_API_TOKEN: ${{ github.token }} + + test-macos: + strategy: + fail-fast: true + matrix: + os: + - macos-10.15 + - macos-11 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install test dependencies + run: brew install coreutils fish + + - name: Install asdf dependencies + uses: asdf-vm/actions/install@v1 + + - name: Run tests + run: bats test + env: + GITHUB_API_TOKEN: ${{ github.token }} + + test-ubuntu: + strategy: + fail-fast: true + matrix: + os: + - ubuntu-18.04 + - ubuntu-20.04 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install test dependencies + run: | + PPA="ppa:fish-shell/nightly-master" + sudo add-apt-repository -y "$PPA" + sudo apt-get update + sudo apt-get -y install fish + + - name: Install asdf dependencies + uses: asdf-vm/actions/install@v1 + + - name: Run tests + run: bats test + env: + GITHUB_API_TOKEN: ${{ github.token }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml deleted file mode 100644 index 661e3eb5b..000000000 --- a/.github/workflows/workflow.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Main workflow - -on: - push: - branches: - - master - paths-ignore: - - "**.md" - pull_request: - paths-ignore: - - "**.md" - -jobs: - test: - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - ubuntu-latest - - windows-latest - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install dependencies on macOS - if: runner.os == 'macOS' - run: brew install coreutils fish - - - name: Install dependencies on Ubuntu - if: runner.os == 'Linux' - run: | - PPA="ppa:fish-shell/nightly-master" - sudo add-apt-repository -y "$PPA" - sudo apt-get update - sudo apt-get -y install fish - - - name: Install bats-core - run: | - git clone --depth 1 --branch v1.2.1 https://github.com/bats-core/bats-core.git $HOME/bats-core - echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - - - name: Run tests on Windows - if: runner.os == 'Windows' - continue-on-error: true - run: bats test - env: - GITHUB_API_TOKEN: ${{ github.token }} - - - name: Run tests on Unix systems - if: runner.os != 'Windows' - run: bats test - env: - GITHUB_API_TOKEN: ${{ github.token }} - - lint: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install shellcheck - run: sudo apt-get install shellcheck - - - name: Run ShellCheck - run: bash lint.sh - - format: - runs-on: macos-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install shfmt - run: brew install shfmt - - - name: List file to shfmt - run: shfmt -f . - - - name: Run shfmt - run: shfmt -d . From b640d2fd34f6711ace7f464870c0457fa668aec5 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 17:28:25 +1000 Subject: [PATCH 04/40] ci: merge macos ubuntu test job into nix job --- .github/workflows/{test.yml => tests.yml} | 32 +++++------------------ README.md | 2 +- 2 files changed, 8 insertions(+), 26 deletions(-) rename .github/workflows/{test.yml => tests.yml} (78%) diff --git a/.github/workflows/test.yml b/.github/workflows/tests.yml similarity index 78% rename from .github/workflows/test.yml rename to .github/workflows/tests.yml index ba7120222..1a11a90f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ on: jobs: test-windows-wsl: strategy: - fail-fast: true + fail-fast: false matrix: os: - windows-2016 @@ -46,13 +46,15 @@ jobs: env: GITHUB_API_TOKEN: ${{ github.token }} - test-macos: + test-nix: strategy: - fail-fast: true + fail-fast: false matrix: os: - macos-10.15 - macos-11 + - ubuntu-18.04 + - ubuntu-20.04 runs-on: ${{ matrix.os }} steps: - name: Checkout code @@ -61,31 +63,11 @@ jobs: fetch-depth: 0 - name: Install test dependencies + if: runner.os == 'macos' run: brew install coreutils fish - - name: Install asdf dependencies - uses: asdf-vm/actions/install@v1 - - - name: Run tests - run: bats test - env: - GITHUB_API_TOKEN: ${{ github.token }} - - test-ubuntu: - strategy: - fail-fast: true - matrix: - os: - - ubuntu-18.04 - - ubuntu-20.04 - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Install test dependencies + if: runner.os == 'linux' run: | PPA="ppa:fish-shell/nightly-master" sudo add-apt-repository -y "$PPA" diff --git a/README.md b/README.md index 40b37c607..1285b56fd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# asdf [![Main workflow](https://github.com/asdf-vm/asdf/workflows/Main%20workflow/badge.svg)](https://github.com/asdf-vm/asdf/actions) +# asdf [![Lint](https://github.com/asdf-vm/asdf/actions/workflows/lint.yaml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/lint.yaml) [![Tests](https://github.com/asdf-vm/asdf/actions/workflows/tests.yaml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/tests.yaml) **Manage multiple runtime versions with a single CLI tool, extendable via plugins** - [docs at asdf-vm.com](https://asdf-vm.github.io/asdf/) From b5e7b7c2f0b39ea0da2e0fb7ba699fa79d733d52 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 17:37:34 +1000 Subject: [PATCH 05/40] ci: wsl distros --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a11a90f6..09641548c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: os: - windows-2016 - windows-2019 - shells: + distribution: - Debian - Ubuntu-20.04 - Ubuntu-18.04 @@ -35,7 +35,7 @@ jobs: - name: Setup WSL & install test dependencies uses: Vampire/setup-wsl@v1 with: - distribution: ${{ matrix.shells }} + distribution: ${{ matrix.distribution }} additional-packages: curl git fish - name: Install asdf dependencies From 108f200ad73fdc618dad741ab37f6f1b0703e25b Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 17:37:44 +1000 Subject: [PATCH 06/40] chore: remove unused Vagrantfile --- Vagrantfile | 71 ----------------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 Vagrantfile diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 12d9294f6..000000000 --- a/Vagrantfile +++ /dev/null @@ -1,71 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -# All Vagrant configuration is done below. The "2" in Vagrant.configure -# configures the configuration version (we support older styles for -# backwards compatibility). Please don't change it unless you know what -# you're doing. -Vagrant.configure(2) do |config| - # The most common configuration options are documented and commented below. - # For a complete reference, please see the online documentation at - # https://docs.vagrantup.com. - - # Every Vagrant development environment requires a box. You can search for - # boxes at https://atlas.hashicorp.com/search. - config.vm.box = "ubuntu/trusty64" - - # Disable automatic box update checking. If you disable this, then - # boxes will only be checked for updates when the user runs - # `vagrant box outdated`. This is not recommended. - # config.vm.box_check_update = false - - # Create a forwarded port mapping which allows access to a specific port - # within the machine from a port on the host machine. In the example below, - # accessing "localhost:8080" will access port 80 on the guest machine. - # config.vm.network "forwarded_port", guest: 80, host: 8080 - - # Create a private network, which allows host-only access to the machine - # using a specific IP. - # config.vm.network "private_network", ip: "192.168.33.10" - - # Create a public network, which generally matched to bridged network. - # Bridged networks make the machine appear as another physical device on - # your network. - # config.vm.network "public_network" - - # Share an additional folder to the guest VM. The first argument is - # the path on the host to the actual folder. The second argument is - # the path on the guest to mount the folder. And the optional third - # argument is a set of non-required options. - # config.vm.synced_folder "../data", "/vagrant_data" - - # Provider-specific configuration so you can fine-tune various - # backing providers for Vagrant. These expose provider-specific options. - # Example for VirtualBox: - # - # config.vm.provider "virtualbox" do |vb| - # # Display the VirtualBox GUI when booting the machine - # vb.gui = true - # - # # Customize the amount of memory on the VM: - # vb.memory = "1024" - # end - # - # View the documentation for the provider you are using for more - # information on available options. - - # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies - # such as FTP and Heroku are also available. See the documentation at - # https://docs.vagrantup.com/v2/push/atlas.html for more information. - # config.push.define "atlas" do |push| - # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" - # end - - # Enable provisioning with a shell script. Additional provisioners such as - # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the - # documentation for more information about their specific syntax and use. - # config.vm.provision "shell", inline: <<-SHELL - # sudo apt-get update - # sudo apt-get install -y apache2 - # SHELL -end From 89847d4dffbbf3cf9d0fc46574b6d485e8dec4f0 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 17:49:18 +1000 Subject: [PATCH 07/40] fix: workflow badge links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1285b56fd..92fd247b2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# asdf [![Lint](https://github.com/asdf-vm/asdf/actions/workflows/lint.yaml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/lint.yaml) [![Tests](https://github.com/asdf-vm/asdf/actions/workflows/tests.yaml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/tests.yaml) +# asdf [![Lint](https://github.com/asdf-vm/asdf/actions/workflows/lint.yml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/lint.yml) [![Tests](https://github.com/asdf-vm/asdf/actions/workflows/tests.yml/badge.svg)](https://github.com/asdf-vm/asdf/actions/workflows/tests.yml) **Manage multiple runtime versions with a single CLI tool, extendable via plugins** - [docs at asdf-vm.com](https://asdf-vm.github.io/asdf/) From e5c8567d2f704139d7a3ef7b76f7d48a08261fd6 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 17:53:32 +1000 Subject: [PATCH 08/40] test: older bats version --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index a7615d27b..61d975a46 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -bats v1.3.0 +bats v1.2.1 shellcheck 0.7.2 shfmt 3.3.0 From fcf69823d550237d3317616c08afec4dfa4dbe4c Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 18:04:15 +1000 Subject: [PATCH 09/40] fix: WSL action does not support WSLv1 on OS windows-2016 --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 09641548c..92309b815 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,6 @@ jobs: fail-fast: false matrix: os: - - windows-2016 - windows-2019 distribution: - Debian From d77372b5706164a5eb9dd6d7484e7b621cf92d55 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 18:19:40 +1000 Subject: [PATCH 10/40] ci: do not use asdf in tests --- .github/workflows/tests.yml | 20 ++++++++++++++++---- .tool-versions | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 92309b815..a092ed463 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,9 @@ on: paths-ignore: - "**.md" +env: + BATS_VERSION: v1.3.0 + jobs: test-windows-wsl: strategy: @@ -37,10 +40,14 @@ jobs: distribution: ${{ matrix.distribution }} additional-packages: curl git fish - - name: Install asdf dependencies - uses: asdf-vm/actions/install@v1 + - name: Install bats + shell: format('wsl-bash_{1}', ${{ matrix.distribution }}) {0} + run: | + git clone --depth 1 --branch "$BATS_VERSION" https://github.com/bats-core/bats-core.git $HOME/bats-core + echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests + shell: format('wsl-bash_{1}', ${{ matrix.distribution }}) {0} run: bats test env: GITHUB_API_TOKEN: ${{ github.token }} @@ -73,8 +80,13 @@ jobs: sudo apt-get update sudo apt-get -y install fish - - name: Install asdf dependencies - uses: asdf-vm/actions/install@v1 + # - name: Install asdf dependencies + # uses: asdf-vm/actions/install@v1 + + - name: Install bats + run: | + git clone --depth 1 --branch "$BATS_VERSION" https://github.com/bats-core/bats-core.git $HOME/bats-core + echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests run: bats test diff --git a/.tool-versions b/.tool-versions index 61d975a46..a7615d27b 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -bats v1.2.1 +bats v1.3.0 shellcheck 0.7.2 shfmt 3.3.0 From 1593a1aa7107e34231fa4027ac32eeea5fcb7c91 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 18:20:50 +1000 Subject: [PATCH 11/40] fix: workflow format --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a092ed463..b2205e8a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,13 +41,13 @@ jobs: additional-packages: curl git fish - name: Install bats - shell: format('wsl-bash_{1}', ${{ matrix.distribution }}) {0} + shell: wsl-bash {0} run: | git clone --depth 1 --branch "$BATS_VERSION" https://github.com/bats-core/bats-core.git $HOME/bats-core echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests - shell: format('wsl-bash_{1}', ${{ matrix.distribution }}) {0} + shell: wsl-bash {0} run: bats test env: GITHUB_API_TOKEN: ${{ github.token }} From bf4ed3864a661dd05dc42cf2c63124630b3d2d77 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 18:28:03 +1000 Subject: [PATCH 12/40] ci: try expression syntax for wsl-bash interpolation --- .github/workflows/tests.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b2205e8a3..2d07c351e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,7 +43,7 @@ jobs: - name: Install bats shell: wsl-bash {0} run: | - git clone --depth 1 --branch "$BATS_VERSION" https://github.com/bats-core/bats-core.git $HOME/bats-core + git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests @@ -52,7 +52,7 @@ jobs: env: GITHUB_API_TOKEN: ${{ github.token }} - test-nix: + nix: strategy: fail-fast: false matrix: @@ -80,12 +80,9 @@ jobs: sudo apt-get update sudo apt-get -y install fish - # - name: Install asdf dependencies - # uses: asdf-vm/actions/install@v1 - - name: Install bats run: | - git clone --depth 1 --branch "$BATS_VERSION" https://github.com/bats-core/bats-core.git $HOME/bats-core + git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" - name: Run tests From dda7f50dc31de9353c768ac453247400a6a4c2d6 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 18:41:20 +1000 Subject: [PATCH 13/40] test: use expression for GITHUB_PATH in WSL --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d07c351e..e799f4db5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ env: BATS_VERSION: v1.3.0 jobs: - test-windows-wsl: + windows-wsl: strategy: fail-fast: false matrix: @@ -44,7 +44,7 @@ jobs: shell: wsl-bash {0} run: | git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core - echo "$HOME/bats-core/bin" >>"$GITHUB_PATH" + echo "$HOME/bats-core/bin" >>"${{ GITHUB_PATH }}" - name: Run tests shell: wsl-bash {0} From 672419791911228243527c7d186c23d506da5d73 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 18:49:01 +1000 Subject: [PATCH 14/40] test: use expression for GITHUB_PATH in WSL --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e799f4db5..449e1e7a9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: shell: wsl-bash {0} run: | git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core - echo "$HOME/bats-core/bin" >>"${{ GITHUB_PATH }}" + echo "$HOME/bats-core/bin" >>"${{ env.GITHUB_PATH }}" - name: Run tests shell: wsl-bash {0} From 2a23db9da1e210fa8d78496608b81bdacb6eff93 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:07:04 +1000 Subject: [PATCH 15/40] test: original append to github path --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 449e1e7a9..fac117174 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: shell: wsl-bash {0} run: | git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core - echo "$HOME/bats-core/bin" >>"${{ env.GITHUB_PATH }}" + echo "$HOME/bats-core/bin" >>$GITHUB_PATH - name: Run tests shell: wsl-bash {0} @@ -58,7 +58,7 @@ jobs: matrix: os: - macos-10.15 - - macos-11 + # - macos-11 - enable once out of private preview: https://github.com/actions/virtual-environments#available-environments - ubuntu-18.04 - ubuntu-20.04 runs-on: ${{ matrix.os }} From 8f884d87413c38c47f89b39f70137d3a2e228b0d Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:10:07 +1000 Subject: [PATCH 16/40] ci: only run on Ubuntu WSL --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fac117174..956be3bfa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,10 +21,10 @@ jobs: os: - windows-2019 distribution: - - Debian - Ubuntu-20.04 - Ubuntu-18.04 # - Alpine + # - Debian # - kali-linux # - openSUSE-Leap-15.2 runs-on: ${{ matrix.os }} From 21381824f188930caa351927cd02bd74301b9a1f Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:13:13 +1000 Subject: [PATCH 17/40] ci: install bats on WSL using install script --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 956be3bfa..3db6b61a6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,8 @@ jobs: shell: wsl-bash {0} run: | git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core - echo "$HOME/bats-core/bin" >>$GITHUB_PATH + cd $HOME/bats-core + ./install.sh $HOME - name: Run tests shell: wsl-bash {0} From f1120db64b4e3e8c8ff47fceb8581c9a6a8d0156 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:21:41 +1000 Subject: [PATCH 18/40] ci: wsl direct exec of bats, no path appending --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3db6b61a6..409eecb2d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,10 +46,11 @@ jobs: git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core cd $HOME/bats-core ./install.sh $HOME + $HOME/bin/bats --version - name: Run tests shell: wsl-bash {0} - run: bats test + run: $HOME/bin/bats test env: GITHUB_API_TOKEN: ${{ github.token }} From 5f25b5994597398d8ac81c094ab116672da34d36 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:34:07 +1000 Subject: [PATCH 19/40] ci: unix line endings when performing checkout --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 409eecb2d..30372142d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ env: BATS_VERSION: v1.3.0 jobs: - windows-wsl: + wsl1: strategy: fail-fast: false matrix: @@ -29,6 +29,11 @@ jobs: # - openSUSE-Leap-15.2 runs-on: ${{ matrix.os }} steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf + - name: Checkout code uses: actions/checkout@v2 with: From 9e9c3f7ff0c6066577db572a82c3117f72166ad5 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:45:49 +1000 Subject: [PATCH 20/40] ci: perform asdf checkout in wsl --- .github/workflows/tests.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30372142d..3719e9b8d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,15 +29,15 @@ jobs: # - openSUSE-Leap-15.2 runs-on: ${{ matrix.os }} steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf false - git config --global core.eol lf + # - name: Set git to use LF + # run: | + # git config --global core.autocrlf false + # git config --global core.eol lf - - name: Checkout code - uses: actions/checkout@v2 - with: - fetch-depth: 0 + # - name: Checkout code + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 - name: Setup WSL & install test dependencies uses: Vampire/setup-wsl@v1 @@ -45,6 +45,11 @@ jobs: distribution: ${{ matrix.distribution }} additional-packages: curl git fish + - name: Checkout asdf + shell: wsl-bash {0} + run: | + git clone --branch "${{ GITHUB_REF }}" "https://github.com/${{ GITHUB_REPOSITORY }}.git" "${{ GITHUB_WORKSPACE }}" + - name: Install bats shell: wsl-bash {0} run: | From 2f46b19fddbf73346ab2955475d37904ed520c31 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 19:55:43 +1000 Subject: [PATCH 21/40] fix: workflow default env vars --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3719e9b8d..3f19b27f1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ GITHUB_REF }}" "https://github.com/${{ GITHUB_REPOSITORY }}.git" "${{ GITHUB_WORKSPACE }}" + git clone --branch "$GITHUB_REF" "https://github.com/$GITHUB_REPOSITORY.git" "$GITHUB_WORKSPACE" - name: Install bats shell: wsl-bash {0} From 07fb690b234ffacbede7fa5d8d86b62b6e262b0d Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 20:54:39 +1000 Subject: [PATCH 22/40] ci: test github workflow default env vars --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3f19b27f1..6a8744d58 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "$GITHUB_REF" "https://github.com/$GITHUB_REPOSITORY.git" "$GITHUB_WORKSPACE" + git clone --branch $GITHUB_REF https://github.com/$GITHUB_REPOSITORY.git $GITHUB_WORKSPACE - name: Install bats shell: wsl-bash {0} From 04be76872d56a244bbae1ce7d88990a599ec96ae Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:16:07 +1000 Subject: [PATCH 23/40] ci: github env vars in wsl workflow --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a8744d58..15cd7abaf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch $GITHUB_REF https://github.com/$GITHUB_REPOSITORY.git $GITHUB_WORKSPACE + git clone --branch $GITHUB_REF $GITHUB_SERVER_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE - name: Install bats shell: wsl-bash {0} From 9dd3efe4aad86ebfb0f6a72d0c2986266472a6dd Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:26:49 +1000 Subject: [PATCH 24/40] ci: github env vars in wsl workflow --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 15cd7abaf..94d33076f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,9 @@ on: env: BATS_VERSION: v1.3.0 + GITHUB_REF: $GITHUB_REF + GITHUB_URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + GITHUB_WORKSPACE: $GITHUB_WORKSPACE jobs: wsl1: @@ -48,7 +51,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch $GITHUB_REF $GITHUB_SERVER_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE + git clone --branch "${{ env.GITHUB_REF }}" ${{ env.GITHUB_URL }} ${{ env.GITHUB_WORKSPACE }} - name: Install bats shell: wsl-bash {0} From 5e1c9691e7d0416c0cc4b856a9df6a86f2e64a01 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:30:44 +1000 Subject: [PATCH 25/40] ci: rename lint jobs --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f6199a3a..f2f572c1a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ on: - "**.md" jobs: - lint: + shellcheck: runs-on: ubuntu-latest steps: - name: Checkout code @@ -33,7 +33,7 @@ jobs: test/test_helpers.bash \ test/fixtures/dummy_plugin/bin/* - format: + shellformat: runs-on: ubuntu-latest steps: - name: Checkout code From 17e6dbeff9744463f739bb1dd7a72c025bfedd23 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:41:01 +1000 Subject: [PATCH 26/40] ci: github env vars in wsl workflow --- .github/workflows/tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 94d33076f..a82a3770b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,9 +12,6 @@ on: env: BATS_VERSION: v1.3.0 - GITHUB_REF: $GITHUB_REF - GITHUB_URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY - GITHUB_WORKSPACE: $GITHUB_WORKSPACE jobs: wsl1: @@ -51,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ env.GITHUB_REF }}" ${{ env.GITHUB_URL }} ${{ env.GITHUB_WORKSPACE }} + git clone --branch "${{ GITHUB_REF }}" "${{ GITHUB_SERVER_URL }}"/""${{ GITHUB_REPOSITORY }} "${{ GITHUB_WORKSPACE }}" - name: Install bats shell: wsl-bash {0} From 8fb8c239b52e6bbda1d5ab6e0adc92496a9d0671 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:44:16 +1000 Subject: [PATCH 27/40] fix: typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a82a3770b..1eea0f727 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ GITHUB_REF }}" "${{ GITHUB_SERVER_URL }}"/""${{ GITHUB_REPOSITORY }} "${{ GITHUB_WORKSPACE }}" + git clone --branch "${{ GITHUB_REF }}" "${{ GITHUB_SERVER_URL }}"/"${{ GITHUB_REPOSITORY }}" "${{ GITHUB_WORKSPACE }}" - name: Install bats shell: wsl-bash {0} From 1563979f103d9f50e7ea28c4382e1d6de61928be Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:45:31 +1000 Subject: [PATCH 28/40] ci: try default env format again --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1eea0f727..9399b33e3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ GITHUB_REF }}" "${{ GITHUB_SERVER_URL }}"/"${{ GITHUB_REPOSITORY }}" "${{ GITHUB_WORKSPACE }}" + git clone --branch "$GITHUB_REF" "$GITHUB_SERVER_URL "/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" - name: Install bats shell: wsl-bash {0} From b684c4d0346ac7d41e50de6615a6ccf857a2c83b Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:52:31 +1000 Subject: [PATCH 29/40] ci: try without run step sequence --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9399b33e3..cb860b4b7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,9 +46,9 @@ jobs: additional-packages: curl git fish - name: Checkout asdf - shell: wsl-bash {0} + shell: wsl-bash run: | - git clone --branch "$GITHUB_REF" "$GITHUB_SERVER_URL "/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" + git clone --branch "$GITHUB_REF" "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" - name: Install bats shell: wsl-bash {0} From b33559a1a08c349f98fe978ba4068c0185b5bfa6 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 21:58:49 +1000 Subject: [PATCH 30/40] ci: use github workspace instead of default env vars --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cb860b4b7..0f9daf343 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash run: | - git clone --branch "$GITHUB_REF" "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" + git clone --branch "${{ github.ref }}" "https://github.com/${{ github.repository }}" "${{ github.workspace }}" - name: Install bats shell: wsl-bash {0} From b9499c8a6ae7c09e04285550a287c189aa33c2b5 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 22:05:16 +1000 Subject: [PATCH 31/40] ci: fix wsl shell cmd --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f9daf343..ea62603ac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,7 +46,7 @@ jobs: additional-packages: curl git fish - name: Checkout asdf - shell: wsl-bash + shell: wsl-bash {0} run: | git clone --branch "${{ github.ref }}" "https://github.com/${{ github.repository }}" "${{ github.workspace }}" From c60842a3e8e7f91b98f37e859289af647bbf83af Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 22:21:59 +1000 Subject: [PATCH 32/40] ci: fix wsl shell cmd --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea62603ac..8ef71712d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ github.ref }}" "https://github.com/${{ github.repository }}" "${{ github.workspace }}" + git clone --branch "${{ github.head_ref }}" https://github.com/"${{ github.repository }}" "$HOME" - name: Install bats shell: wsl-bash {0} From 7a56d0c6c71a2bdfeb2cb2f624f6b5573e8d61c2 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 22:26:11 +1000 Subject: [PATCH 33/40] ci: fix typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ef71712d..d2288dfc8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ github.head_ref }}" https://github.com/"${{ github.repository }}" "$HOME" + git clone --branch "${{ github.head_ref }}" "https://github.com/${{ github.repository }}" "$HOME" - name: Install bats shell: wsl-bash {0} From 29eaae22978ccb7d64c446113c333fd7ea2cb389 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 22:32:46 +1000 Subject: [PATCH 34/40] ci: clone asdf to specific empty dir --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d2288dfc8..a45de99bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Checkout asdf shell: wsl-bash {0} run: | - git clone --branch "${{ github.head_ref }}" "https://github.com/${{ github.repository }}" "$HOME" + git clone --branch "${{ github.head_ref }}" "https://github.com/${{ github.repository }}" "$HOME/asdf" - name: Install bats shell: wsl-bash {0} @@ -60,7 +60,9 @@ jobs: - name: Run tests shell: wsl-bash {0} - run: $HOME/bin/bats test + run: | + cd $HOME/asdf + $HOME/bin/bats test env: GITHUB_API_TOKEN: ${{ github.token }} From 1aa18403c6e1ebd42c9c199fcb3a1004c9b580bc Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 23:36:34 +1000 Subject: [PATCH 35/40] ci: do not fail on wsl1 --- .github/workflows/tests.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a45de99bb..abcb0dbf6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ env: jobs: wsl1: + continue-on-error: true strategy: fail-fast: false matrix: @@ -29,15 +30,15 @@ jobs: # - openSUSE-Leap-15.2 runs-on: ${{ matrix.os }} steps: - # - name: Set git to use LF - # run: | - # git config --global core.autocrlf false - # git config --global core.eol lf + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf - # - name: Checkout code - # uses: actions/checkout@v2 - # with: - # fetch-depth: 0 + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup WSL & install test dependencies uses: Vampire/setup-wsl@v1 @@ -45,11 +46,6 @@ jobs: distribution: ${{ matrix.distribution }} additional-packages: curl git fish - - name: Checkout asdf - shell: wsl-bash {0} - run: | - git clone --branch "${{ github.head_ref }}" "https://github.com/${{ github.repository }}" "$HOME/asdf" - - name: Install bats shell: wsl-bash {0} run: | From 0896fe41cebdf56b6ca25e4811e0415acef0e0c8 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 23:39:20 +1000 Subject: [PATCH 36/40] chore: rename lint workflow step --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f2f572c1a..b67afe8df 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,7 +33,7 @@ jobs: test/test_helpers.bash \ test/fixtures/dummy_plugin/bin/* - shellformat: + shellfmt: runs-on: ubuntu-latest steps: - name: Checkout code From d3270fb432976680e198c5b180e8bb7b1c79abf2 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 23:45:10 +1000 Subject: [PATCH 37/40] ci: wsl bats exec location in default dir --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index abcb0dbf6..846db2369 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,7 +57,6 @@ jobs: - name: Run tests shell: wsl-bash {0} run: | - cd $HOME/asdf $HOME/bin/bats test env: GITHUB_API_TOKEN: ${{ github.token }} From 7645f696d35265f29192638dce905050d5133f28 Mon Sep 17 00:00:00 2001 From: jthegedus Date: Tue, 25 May 2021 23:53:53 +1000 Subject: [PATCH 38/40] ci: wsl green check when tests fail --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 846db2369..9076adcac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,6 @@ env: jobs: wsl1: - continue-on-error: true strategy: fail-fast: false matrix: @@ -55,6 +54,7 @@ jobs: $HOME/bin/bats --version - name: Run tests + continue-on-error: true shell: wsl-bash {0} run: | $HOME/bin/bats test From bcbd1a2f67495b54ec3aeb7ec831b248096b481b Mon Sep 17 00:00:00 2001 From: jthegedus Date: Wed, 26 May 2021 00:05:05 +1000 Subject: [PATCH 39/40] ci: rm workflow execution filter --- .github/workflows/lint.yml | 4 ---- .github/workflows/tests.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b67afe8df..f5bfc83c4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,11 +4,7 @@ on: push: branches: - master - paths-ignore: - - "**.md" pull_request: - paths-ignore: - - "**.md" jobs: shellcheck: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9076adcac..5d60fd3ad 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,11 +4,7 @@ on: push: branches: - master - paths-ignore: - - "**.md" pull_request: - paths-ignore: - - "**.md" env: BATS_VERSION: v1.3.0 From b47d5862951b0aeee1ee1ee21fbefc8b89eaa92c Mon Sep 17 00:00:00 2001 From: jthegedus Date: Wed, 26 May 2021 22:49:16 +1000 Subject: [PATCH 40/40] ci: remove continue-on-error for wsl1 job --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d60fd3ad..cbb532db1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,6 @@ jobs: $HOME/bin/bats --version - name: Run tests - continue-on-error: true shell: wsl-bash {0} run: | $HOME/bin/bats test