Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ynahmany committed Nov 21, 2024
1 parent e2fb298 commit edaaceb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
27 changes: 15 additions & 12 deletions dist/post.js

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

29 changes: 14 additions & 15 deletions src/post.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as core from '@actions/core'
import * as exec from '@actions/exec'
// import path from 'path'
// import fs from 'fs'
import path from 'path'
import fs from 'fs'

interface PostState {
or8n?: boolean
Expand Down Expand Up @@ -55,25 +55,24 @@ async function run(): Promise<void> {
}

if (state.pwOutputDir) {
// const lastRunFilePath = path.resolve(
// state.pwOutputDir ?? 'test-results',
// '.last-run.json'
// )
// options.push('--yohay');
// if (!fs.existsSync(lastRunFilePath)) {
// // Create the file and optionally initialize it with some content
// fs.writeFileSync(lastRunFilePath, '', { encoding: 'utf-8' });
// console.log(`File created at: ${lastRunFilePath}`);
// } else {
// console.log(`File already exists at: ${lastRunFilePath}`);
// }
options.push(`--pw-output-dir ${state.pwOutputDir}`)
}

if (state.debug) {
options.push(`--debug`)
}

const lastRunFilePath = path.resolve(
state.pwOutputDir ?? 'test-results',
'.last-run.json'
)
options.push('--yohay');
if (!fs.existsSync(lastRunFilePath)) {
// Create the file and optionally initialize it with some content
fs.writeFileSync(lastRunFilePath, '', { encoding: 'utf-8' });
console.log(`File created at: ${lastRunFilePath}`);
} else {
console.log(`File already exists at: ${lastRunFilePath}`);
}
const cacheSetCommand = `npx currents cache set ${options.join(' ')}`

await exec.exec(cacheSetCommand)
Expand Down

0 comments on commit edaaceb

Please sign in to comment.