From b8a2ffca66eedbb04aa29b8a809a54501f12baf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 16:27:33 +0200 Subject: [PATCH 1/7] Create test.yml Adds initial CI/CD Test for github-pr-resource --- .github/workflows/test.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..e9dc8482 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +on: [push, pull_request] +name: Test +jobs: + test: + strategy: + matrix: + go-version: [1.14.x, 1.15.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Install Task + uses: Arduino/actions/setup-taskfile@master + with: + version: '2.x' + - name: Run CI Task + run: task ci From 5b2e1012b16efea1e0295e2bdb1f81d9dce4220e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 16:36:50 +0200 Subject: [PATCH 2/7] Update test.yml Change to downloading module instead --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9dc8482..0d249985 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Install Task - uses: Arduino/actions/setup-taskfile@master - with: - version: '2.x' + run: go get github.com/go-task/task - name: Run CI Task run: task ci From c06a2c034896b944c6bb5358a2f2546ab454e660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 16:43:31 +0200 Subject: [PATCH 3/7] Remove windows-latest runner --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d249985..3078900f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.14.x, 1.15.x] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Install Go @@ -15,6 +15,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Install Task - run: go get github.com/go-task/task + run: curl -sL https://taskfile.dev/install.sh | sh - name: Run CI Task - run: task ci + run: ./bin/task ci From 76ea6d4230ca0588ef7d2cc558f342176263c7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 16:51:00 +0200 Subject: [PATCH 4/7] Restore windows-runner to CI/CD flow --- .github/workflows/test.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3078900f..6a8af21a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,15 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - - name: Install Task + - name: Install Task (Linux/macOS) + if: runner.os != 'Windows' run: curl -sL https://taskfile.dev/install.sh | sh + - name: Install Task (Windows) + if: runner.os == 'Windows' + shell: powershell + run: | + Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') + scoop bucket add extras + scoop install task - name: Run CI Task - run: ./bin/task ci + run: task ci From 05d742665826b9d8e47c54d55df59435228091ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 16:55:10 +0200 Subject: [PATCH 5/7] Conditional rule to task --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a8af21a..18e92155 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,5 +24,10 @@ jobs: Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') scoop bucket add extras scoop install task - - name: Run CI Task + - name: Run CI Task (Linux/macOS) + if: runner.os != 'Windows' + run: ./bin/task ci + - name: Run CI Task (Windows) + if: runner.os == 'Windows' run: task ci + From 4edb60b6c57f8f6126971cdd0474eb3742912853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 16:57:35 +0200 Subject: [PATCH 6/7] Restore windows-latest --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18e92155..dbdd9114 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.14.x, 1.15.x] - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Install Go From 940551a77273bb10d229cbed7122aa4a18ed3698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Mon, 19 Oct 2020 17:03:05 +0200 Subject: [PATCH 7/7] Remove windows-latest --- .github/workflows/test.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dbdd9114..9e56bb94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.14.x, 1.15.x] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Install Go @@ -14,20 +14,8 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - - name: Install Task (Linux/macOS) - if: runner.os != 'Windows' + - name: Install Task run: curl -sL https://taskfile.dev/install.sh | sh - - name: Install Task (Windows) - if: runner.os == 'Windows' - shell: powershell - run: | - Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') - scoop bucket add extras - scoop install task - - name: Run CI Task (Linux/macOS) - if: runner.os != 'Windows' + - name: Run CI Task run: ./bin/task ci - - name: Run CI Task (Windows) - if: runner.os == 'Windows' - run: task ci