-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove CircleCI and replace with GitHub Actions #16
base: 2.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Terminus Plugin Example | ||
on: push | ||
jobs: | ||
checkout_lint: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/pantheon-public/php-ci:v7.4 | ||
name: Checkout & lint | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Save repo content as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: full-workspace | ||
path: ${{ github.workspace }} | ||
- name: Full Composer Install | ||
run: composer install | ||
- name: Install test tools | ||
run: composer install-tools | ||
- name: Validate Code | ||
run: composer cs | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
php-versions: ['7.4', '8.0'] | ||
container: | ||
image: pantheonpublic/terminus-plugin-test:4.x-php${{ matrix.php-versions }} | ||
name: Test (PHP ${{ matrix.php-versions }}) | ||
needs: [ checkout_lint ] | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: /terminus-plugin-test/plugin | ||
env: | ||
TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }} | ||
TERMINUS_SITE: ${{ secrets.TERMINUS_SITE }} | ||
BASH_ENV: ~/.bashrc | ||
HOME: /home/tester | ||
steps: | ||
- name: Download repo content from artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: full-workspace | ||
path: /terminus-plugin-test/plugin | ||
- name: Setup environment | ||
run: chmod +x ./.ci/set-up-globals.sh && ./.ci/set-up-globals.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you just copy this from Build Tools? I don't see the set-up-globals script. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The directory was renamed from |
||
- name: Check Terminus version | ||
run: terminus --version | ||
- name: Install plugin | ||
run: terminus self:plugin:install . | ||
- name: Install SSH key | ||
uses: shimataro/[email protected] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is failing right now, presumably due to the lack of a secret. This plugin does not require a fixture site, so we have the deep philosophical question: should we set up testing fixtures for plugins that don't need them, just so that folks who copy the code have example test fixtures? There's some merit to that, but I'd say maybe we should just keep it simple and remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd comment stuff out in the ci.yml file. This way, it's still there for people to copy but it's not affecting this project. Maybe comment out the lines and add a comment that to enable people should add secret and uncomment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will commenting make the tests pass though? Can't we just make universal test secrets that are limited in scope to only testing repos? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commenting those sections in this specific plugin will make it pass because this plugin tests don't need those secrets There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ssh-key-action is failing in GitHub actions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could just set the secrets everywhere if we want the example here for reference. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do we plan on solving the ssh/secrets bottleneck? |
||
with: | ||
key: ${{ secrets.SSH_KEY }} | ||
known_hosts: unnecessary | ||
- name: Run tests | ||
run: composer test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we just remove Circle now that we have GitHub actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still being used by GitHub Actions. You just commented where it's being used. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misread as
.circleci/...
😊