-
Notifications
You must be signed in to change notification settings - Fork 251
feat: converted circleci workflows to gha #2840
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
base: main
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: stoplightio/elements/perform-lockfile-maintenance | ||
| on: | ||
| schedule: | ||
| - cron: 0 3 * * 1 | ||
| # # 'filters' was not transformed because there is no suitable equivalent in GitHub Actions | ||
| jobs: | ||
| lockfile-maintenance: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: node:lts | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| - run: weekly_lockfile_maintenance.sh | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
| name: stoplightio/elements/test-and-release | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| lint-and-check: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: node:lts | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| - run: yarn --frozen-lockfile | ||
| - run: yarn type-check | ||
| - run: yarn lint | ||
| - run: yarn test.prod | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: test-results | ||
| build: | ||
| defaults: | ||
| run: | ||
| working-directory: "/mnt/ramdisk/project" | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: node:18.20 | ||
| env: | ||
| CYPRESS_CACHE_FOLDER: "/mnt/ramdisk/.cache/Cypress" | ||
| YARN_CACHE_FOLDER: "/mnt/ramdisk/.cache/yarn" | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| - run: yarn --frozen-lockfile | ||
| - run: yarn build | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: |- | ||
| /mnt/ramdisk//project | ||
| /mnt/ramdisk//.cache/Cypress | ||
| build-docs: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: node:lts | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| - run: yarn --frozen-lockfile | ||
| - run: yarn build.docs | ||
| e2e-react-cra: | ||
| defaults: | ||
| run: | ||
| working-directory: "/mnt/ramdisk/project" | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: cypress/base:16.18.1 | ||
| env: | ||
| TERM: xterm | ||
| needs: | ||
| - build | ||
| env: | ||
| CYPRESS_CACHE_FOLDER: "/mnt/ramdisk/.cache/Cypress" | ||
| YARN_CACHE_FOLDER: "/mnt/ramdisk/.cache/yarn" | ||
| example-name: react-cra | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: "/mnt/ramdisk/" | ||
| - name: Example - use local builds | ||
| run: yarn copy:${{ env.example-name }} | ||
| working-directory: "/mnt/ramdisk/project" | ||
| - name: Example - Install dependencies | ||
|
Contributor
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. why are the names sometimes
Author
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 from the tool I used. I am cross referencing everything the tool did versus the circleci config file. I review this more before I merge. |
||
| run: yarn install | ||
| working-directory: "/mnt/ramdisk/project/examples-dev/${{ env.example-name }}" | ||
| - name: Example - Build | ||
| run: yarn build | ||
| working-directory: "/mnt/ramdisk/project/examples-dev/${{ env.example-name }}" | ||
| - name: Run E2E checks | ||
| run: yarn e2e:run:${{ env.example-name }} | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results/videos | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results/screenshots | ||
| e2e-angular: | ||
| defaults: | ||
| run: | ||
| working-directory: "/mnt/ramdisk/project" | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: cypress/base:16.18.1 | ||
| env: | ||
| TERM: xterm | ||
| needs: | ||
| - build | ||
| env: | ||
| CYPRESS_CACHE_FOLDER: "/mnt/ramdisk/.cache/Cypress" | ||
| YARN_CACHE_FOLDER: "/mnt/ramdisk/.cache/yarn" | ||
| example-name: angular | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: "/mnt/ramdisk/" | ||
| - name: Example - use local builds | ||
| run: yarn copy:${{ env.example-name }} | ||
| working-directory: "/mnt/ramdisk/project" | ||
| - name: Example - Install dependencies | ||
| run: yarn install | ||
| working-directory: "/mnt/ramdisk/project/examples-dev/${{ env.example-name }}" | ||
| - name: Example - Build | ||
| run: yarn build | ||
| working-directory: "/mnt/ramdisk/project/examples-dev/${{ env.example-name }}" | ||
| - name: Run E2E checks | ||
| run: yarn e2e:run:${{ env.example-name }} | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results/videos | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results/screenshots | ||
| e2e-static-html: | ||
| defaults: | ||
| run: | ||
| working-directory: "/mnt/ramdisk/project" | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: cypress/base:16.18.1 | ||
| env: | ||
| TERM: xterm | ||
| needs: | ||
| - build | ||
| env: | ||
| CYPRESS_CACHE_FOLDER: "/mnt/ramdisk/.cache/Cypress" | ||
| YARN_CACHE_FOLDER: "/mnt/ramdisk/.cache/yarn" | ||
| example-name: static-html | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: "/mnt/ramdisk/" | ||
| - name: Example - use local builds | ||
| run: yarn copy:${{ env.example-name }} | ||
| working-directory: "/mnt/ramdisk/project" | ||
| - name: Example - Install dependencies | ||
| run: yarn install | ||
| working-directory: "/mnt/ramdisk/project/examples-dev/${{ env.example-name }}" | ||
| - name: Example - Build | ||
| run: yarn build | ||
| working-directory: "/mnt/ramdisk/project/examples-dev/${{ env.example-name }}" | ||
| - name: Run E2E checks | ||
| run: yarn e2e:run:${{ env.example-name }} | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results/videos | ||
| - uses: actions/[email protected] | ||
| with: | ||
| path: cypress/results/screenshots | ||
| release: | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: node:18.20 | ||
| needs: | ||
| - lint-and-check | ||
| - build | ||
| - build-docs | ||
| - e2e-react-cra | ||
| - e2e-static-html | ||
| - e2e-angular | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| - name: Install Dependencies | ||
| run: yarn --frozen-lockfile | ||
| - name: Set NPM Token | ||
| run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
| - name: Run Release Script | ||
| run: yarn release | ||
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.
why is this comment here? i'm assuming this was just run through an llm, but what do we lose/gain by not using the filters from circle ci?
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 was run through a github actions importer tool from microsoft. The filters I believe were to enforce semver on the tags. I can fix that I found a solution using github filters.
Uh oh!
There was an error while loading. Please reload this page.
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 looked at the orginal config file this is the original filters code:
filters:
branches:
only:
- main
Scheduled jobs run only on the last commit of the default branch so a filter shouldn't be needed.