Skip to content

Commit

Permalink
chore: same tests for merge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelramos committed Jul 21, 2024
1 parent 20dd205 commit 23fb41c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/log_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20.x'
Expand All @@ -16,5 +18,12 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
const { logging } = await import('${{ github.workspace }}/test.mjs');
logging({ github, context, core });
const root = '${{ github.workspace }}';
const branch = '${{ github.head_ref || github.ref_name }}';
const repoName = '${{ github.repository }}';
const { getActionInfo } = await import('${{ github.workspace }}/actions.mjs');
const { log } = await import('${{ github.workspace }}/test.mjs');
log(getActionInfo({ context, root, branch, repoName }));
log({ context, root });
4 changes: 1 addition & 3 deletions actions.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getProjectRootPath, getChange, getPackages, getChangedPackages } from '@websublime/workspace-tools';
import { getProjectRootPath, getChange, getChangedPackages } from '@websublime/workspace-tools';
import { inspect } from 'node:util';

function log(...args) {
Expand All @@ -11,8 +11,6 @@ export function getActionInfo({ context, root, branch, repoName }) {
let change = getChange(branch.replace('refs/heads/', ''), projectRoot);
let packages = getChangedPackages('origin/main', projectRoot);

log(getPackages(projectRoot));

return {
branch,
change,
Expand Down

0 comments on commit 23fb41c

Please sign in to comment.