-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Migrate scratch-gui to GitHub Actions #9330
Conversation
83369da
to
b9c5d28
Compare
- add setup - cache dependencies and dependency outputs - add build job - add unit test job - add integration test job - add npm deploy - add gh pages deploy
83223c2
to
c983032
Compare
2d15b55
to
9282eea
Compare
5ebba30
to
7251656
Compare
@@ -14,7 +14,6 @@ | |||
"build": "npm run clean && webpack --colors --bail", | |||
"clean": "rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist", | |||
"deploy": "touch build/.nojekyll && gh-pages -t -d build -m \"[skip ci] Build for $(git log --pretty=format:%H -n1)\"", | |||
"prepare": "husky install", |
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.
Good riddance!
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.
I noticed a couple small changes that I think are needed to keep consistent with previous behavior, but it's looking good!
if: github.ref_name == 'develop' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
cache: "npm" |
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.
I believe this line tells the setup-node
action to cache the npm package cache, so the "Cache node_modules" item further down shouldn't be necessary
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.
Oh, never mind. I see now that you're using those cache items to carry files to the other jobs.
.github/workflows/ci-cd.yml
Outdated
GitHub head ref: ${{ github.head_ref }} | ||
EOF | ||
- name: Install Dependencies | ||
run: npm install |
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.
run: npm install | |
run: npm ci |
.github/workflows/ci-cd.yml
Outdated
- name: Run Build | ||
run: npm run build |
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.
- name: Run Build | |
run: npm run build | |
- name: Run Build | |
env: | |
NODE_ENV: production | |
run: npm run build |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }} | ||
${{ steps.setup-chrome.outputs.chrome-path }} --version |
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.
😎
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.
👍 🚀
Resolves
https://scratchfoundation.atlassian.net/browse/ENG-11