Skip to content

Commit 4f4571f

Browse files
committed
Don't require a secrets
1 parent bca7651 commit 4f4571f

File tree

10 files changed

+7
-53
lines changed

10 files changed

+7
-53
lines changed

.github/actions/easy_compile/action.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ inputs:
99
step:
1010
description: "The step to run"
1111
required: true
12-
token:
13-
description: "TODO this is needed to install the Easy Compile gem from the GitHub repo. Can be removed "
14-
required: false
1512
test-command:
1613
description: "The command to run the test suite. By default Easy Compile will run either `bundle exec rake test` or `bundle exec rake spec` depending on the test framework used."
1714
required: false
@@ -20,16 +17,10 @@ inputs:
2017
runs:
2118
using: "composite"
2219
steps:
23-
- name: Checkout easy compile # TODO this can be removed once this tool is pusblished on RubyGems
24-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
25-
with:
26-
path: "tmp"
27-
repository: "shopify-playground/edouard-playground"
28-
token: ${{ inputs.token }}
2920
- name: Install easy compile # TODO this can be removed once this tool is pusblished on RubyGems
3021
shell: bash
3122
run: "rake install"
32-
working-directory: "tmp"
23+
working-directory: "${{ github.action_path }}"
3324
- name: "Setup Rake Compiler"
3425
if: "${{ inputs.step == 'compile' }}"
3526
uses: actions/github-script@v8

.github/workflows/e2e-dummy-gem.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
uses: "./.github/actions/easy_compile"
2222
with:
2323
step: "compile"
24-
token: ${{ secrets.GITHUB_TOKEN }}
2524
working-directory: "test/fixtures/dummy_gem"
2625
test:
2726
timeout-minutes: 20
@@ -46,7 +45,6 @@ jobs:
4645
uses: "./.github/actions/easy_compile"
4746
with:
4847
step: "test_${{ matrix.type }}"
49-
token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem
5048
working-directory: "test/fixtures/dummy_gem"
5149
install:
5250
timeout-minutes: 5
@@ -66,5 +64,4 @@ jobs:
6664
- name: "Run easy compile"
6765
uses: "./.github/actions/easy_compile"
6866
with:
69-
token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem
7067
step: "install"

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
- name: "Compile when target has rake as dependency"
3535
working-directory: "test/fixtures/dummy_gem"
3636
run: "easy_compile compile"
37+
- name: "Bundle install on target gem"
38+
working-directory: "test/fixtures/dummy_gem"
39+
run: "bundle install"
40+
env:
41+
BUNDLE_GEMFILE: "Gemfile_no_rake"
3742
- name: "Compile when target gem doesn't have rake as dependency"
3843
working-directory: "test/fixtures/dummy_gem"
3944
run: "easy_compile compile"

lib/easy_compile/templates/.github/workflows/easy-compile.yaml.tt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
3131
with:
3232
step: "compile"
33-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
3433
<%- if options['working-directory'] -%>
3534
working-directory: "<%= options['working-directory'] %>"
3635
<%- end -%>
@@ -59,7 +58,6 @@ jobs:
5958
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
6059
with:
6160
step: "test_${{ matrix.type }}"
62-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
6361
<%- if options['working-directory'] -%>
6462
working-directory: "<%= options['working-directory'] %>"
6563
<%- end -%>
@@ -82,7 +80,6 @@ jobs:
8280
- name: "Run easy compile"
8381
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
8482
with:
85-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
8683
step: "install"
8784
release:
8885
permissions:
@@ -102,4 +99,3 @@ jobs:
10299
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
103100
with:
104101
step: "release"
105-
token: ${{ secrets.GITHUB_TOKEN }}

test/fixtures/dummy_gem/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Gemfile.lock
2+
Gemfile_no_rake.lock
23
lib/*.bundle
34
tmp/

test/fixtures/dummy_gem/Gemfile_no_rake.lock

Lines changed: 0 additions & 20 deletions
This file was deleted.

test/fixtures/expected_github_workflow.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
2828
with:
2929
step: "compile"
30-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
3130
test:
3231
timeout-minutes: 20
3332
name: "Run the test suite"
@@ -50,7 +49,6 @@ jobs:
5049
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
5150
with:
5251
step: "test_${{ matrix.type }}"
53-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
5452
install:
5553
timeout-minutes: 5
5654
name: "Verify the gem can be installed"
@@ -67,7 +65,6 @@ jobs:
6765
- name: "Run easy compile"
6866
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
6967
with:
70-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
7168
step: "install"
7269
release:
7370
permissions:
@@ -87,4 +84,3 @@ jobs:
8784
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
8885
with:
8986
step: "release"
90-
token: ${{ secrets.GITHUB_TOKEN }}

test/fixtures/expected_github_workflow_test_and_workdir.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
2929
with:
3030
step: "compile"
31-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
3231
working-directory: "foo/bar"
3332
test:
3433
timeout-minutes: 20
@@ -53,7 +52,6 @@ jobs:
5352
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
5453
with:
5554
step: "test_${{ matrix.type }}"
56-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
5755
working-directory: "foo/bar"
5856
test-command: "bundle exec something"
5957
install:
@@ -72,7 +70,6 @@ jobs:
7270
- name: "Run easy compile"
7371
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
7472
with:
75-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
7673
step: "install"
7774
release:
7875
permissions:
@@ -92,4 +89,3 @@ jobs:
9289
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
9390
with:
9491
step: "release"
95-
token: ${{ secrets.GITHUB_TOKEN }}

test/fixtures/expected_github_workflow_test_command.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
2828
with:
2929
step: "compile"
30-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
3130
test:
3231
timeout-minutes: 20
3332
name: "Run the test suite"
@@ -50,7 +49,6 @@ jobs:
5049
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
5150
with:
5251
step: "test_${{ matrix.type }}"
53-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
5452
test-command: "bundle exec something"
5553
install:
5654
timeout-minutes: 5
@@ -68,7 +66,6 @@ jobs:
6866
- name: "Run easy compile"
6967
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
7068
with:
71-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
7269
step: "install"
7370
release:
7471
permissions:
@@ -88,4 +85,3 @@ jobs:
8885
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
8986
with:
9087
step: "release"
91-
token: ${{ secrets.GITHUB_TOKEN }}

test/fixtures/expected_github_workflow_working_dir.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
2929
with:
3030
step: "compile"
31-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
3231
working-directory: "test/fixtures/date"
3332
test:
3433
timeout-minutes: 20
@@ -53,7 +52,6 @@ jobs:
5352
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
5453
with:
5554
step: "test_${{ matrix.type }}"
56-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
5755
working-directory: "test/fixtures/date"
5856
install:
5957
timeout-minutes: 5
@@ -71,7 +69,6 @@ jobs:
7169
- name: "Run easy compile"
7270
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
7371
with:
74-
token: ${{ secrets.EASY_COMPILE }} # TODO Remove this before publishing the gem
7572
step: "install"
7673
release:
7774
permissions:
@@ -91,4 +88,3 @@ jobs:
9188
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
9289
with:
9390
step: "release"
94-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)