Add and configure ESLint and update configuration for Prettier (#458)

* Add ESLint config and update Prettier

* Update test files

* Rebuild action

* Update docs

* Update licenses

* Update tsconfig

* Rebuild action

* Update tsconfig.json

* Fix console.time calls

* Rebuild action

* Rebuild action on Linux
This commit is contained in:
Ivan
2023-03-09 14:49:35 +02:00
committed by GitHub
parent ea15b3b99c
commit 0de5c66fc0
55 changed files with 4402 additions and 1317 deletions

View File

@ -1,6 +1,7 @@
import path = require('path');
import io = require('@actions/io');
import exec = require('@actions/exec');
import * as path from 'path';
import * as io from '@actions/io';
import * as exec from '@actions/exec';
import * as gpg from '../src/gpg';
jest.mock('@actions/exec', () => {
return {
@ -11,8 +12,6 @@ jest.mock('@actions/exec', () => {
const tempDir = path.join(__dirname, 'runner', 'temp');
process.env['RUNNER_TEMP'] = tempDir;
import gpg = require('../src/gpg');
describe('gpg tests', () => {
beforeEach(async () => {
await io.mkdirP(tempDir);
@ -33,7 +32,11 @@ describe('gpg tests', () => {
expect(keyId).toBeNull();
expect(exec.exec).toHaveBeenCalledWith('gpg', expect.anything(), expect.anything());
expect(exec.exec).toHaveBeenCalledWith(
'gpg',
expect.anything(),
expect.anything()
);
});
});
@ -42,7 +45,11 @@ describe('gpg tests', () => {
const keyId = 'asdfhjkl';
await gpg.deleteKey(keyId);
expect(exec.exec).toHaveBeenCalledWith('gpg', expect.anything(), expect.anything());
expect(exec.exec).toHaveBeenCalledWith(
'gpg',
expect.anything(),
expect.anything()
);
});
});
});