Skip to content

Commit 89e8630

Browse files
authored
Updating tooling dependencies (#56)
* Updating tooling dependencies * Removing Gitpod YAML * Making Action run more in CI * Backing out change
1 parent 1feccb2 commit 89e8630

File tree

10 files changed

+19698
-19423
lines changed

10 files changed

+19698
-19423
lines changed

.eslintignore

-3
This file was deleted.

.eslintrc.json

-59
This file was deleted.

.github/workflows/test.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ jobs:
1010
build: # make sure build/ci work properly
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- run: |
1515
npm install
1616
npm run all
1717
1818
test: # make sure the action works on a clean machine without building
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- uses: ./
23+
with:
24+
argocd-token: foobar-bazqux
25+
github-token: ${{ github.token }}

__tests__/main.test.ts

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
import * as process from 'process';
2-
import * as cp from 'child_process';
3-
import * as path from 'path';
1+
import os from 'os';
42

5-
// shows how the runner will run a javascript action with env / stdout protocol
6-
test('test runs', () => {
7-
process.env['ARCH'] = 'darwin';
8-
process.env['GITHUB_REPOSITORY'] = 'quizlet/cd-infra';
9-
process.env['INPUT_GITHUB-TOKEN'] = '500';
10-
process.env['INPUT_ARGOCD-VERSION'] = 'v1.6.1';
11-
process.env['INPUT_ARGOCD-SERVER-URL'] = 'argocd.qzlt.io';
12-
process.env['INPUT_ARGOCD-TOKEN'] = 'foo';
13-
const ip = path.join(__dirname, '..', 'lib', 'main.js');
14-
const options: cp.ExecSyncOptions = {
15-
env: process.env
16-
};
17-
console.log(cp.execSync(`node ${ip}`, options).toString());
18-
});
19-
20-
afterAll(() => {
21-
cp.execSync('rm -rf bin');
3+
describe('main', () => {
4+
// shows how the runner will run a javascript action with env / stdout protocol
5+
test('test runs', async () => {
6+
process.env['RUNNER_TEMP'] = os.tmpdir();
7+
process.env['GITHUB_REPOSITORY'] = 'quizlet/cd-infra';
8+
process.env['INPUT_GITHUB-TOKEN'] = '500';
9+
process.env['INPUT_ARGOCD-VERSION'] = 'v1.6.1';
10+
process.env['INPUT_ARGOCD-SERVER-URL'] = 'argocd.qzlt.io';
11+
process.env['INPUT_ARGOCD-TOKEN'] = 'foo';
12+
expect(import('../src/main')).resolves.toBeTruthy();
13+
});
2214
});

0 commit comments

Comments
 (0)