Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/perform-lockfile-maintenance.yml
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
Copy link
Contributor

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?

Copy link
Author

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.

Copy link
Author

@mattshaner mattshaner Oct 29, 2025

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.

jobs:
lockfile-maintenance:
runs-on: ubuntu-latest
container:
image: node:lts
steps:
- uses: actions/[email protected]
- run: weekly_lockfile_maintenance.sh
183 changes: 183 additions & 0 deletions .github/workflows/test-and-release.yml
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are the names sometimes Example - and sometimes not?

Copy link
Author

Choose a reason for hiding this comment

The 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