Skip to content

Commit

Permalink
mv to .github
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmink committed Mar 19, 2024
1 parent e0de44e commit d06b61d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ let getChangedSchema = async () => {
}

const processFile = async (file) => {
const dataNew = readFileSync(`../${file}`, 'utf8');
const dataNew = readFileSync(`../../${file}`, 'utf8');
const schemaNew = JSON.parse(dataNew);

try {
await exec.exec(`git checkout remotes/origin/main -- `, [file], { cwd: `../`} );
await exec.exec(`git checkout remotes/origin/main -- `, [file], { cwd: `../../`} );
} catch (error) {
core.info(`File ${file} is not known to main branch.`);
// file is not on main branch, so we continue and compare the file to itself (no harm)
}

try {
const dataOld = readFileSync(`../${file}`, 'utf8');
const dataOld = readFileSync(`../../${file}`, 'utf8');
const schemaOld = JSON.parse(dataOld);

difftool.validateSchemaCompatibility(schemaOld, schemaNew);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Compability Check
name: Compatibility Check

on:
pull_request:
Expand All @@ -14,14 +14,14 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Run script
id: check_incompability
id: check_incompatibility
run: |
cd minka-js
cd .github/compatibility
npm ci
npm run check
- name: Add label PR on failure
if: failure() && steps.check_incompability.outcome == 'failure' # Only runs if your script failed.
if: failure() && steps.check_incompatibility.outcome == 'failure' # Only runs if your script failed.
uses: actions/github-script@v7
with:
script: |
Expand All @@ -41,7 +41,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Remove label PR on success
if: steps.check_incompability.outcome == 'success'
if: steps.check_incompatibility.outcome == 'success'
uses: actions/github-script@v7
with:
script: |
Expand Down

0 comments on commit d06b61d

Please sign in to comment.