Skip to content

Commit

Permalink
Updating tooling dependencies (#56)
Browse files Browse the repository at this point in the history
* Updating tooling dependencies

* Removing Gitpod YAML

* Making Action run more in CI

* Backing out change
  • Loading branch information
karoun authored Dec 5, 2024
1 parent 1feccb2 commit 89e8630
Show file tree
Hide file tree
Showing 10 changed files with 19,698 additions and 19,423 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

59 changes: 0 additions & 59 deletions .eslintrc.json

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
npm install
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./
with:
argocd-token: foobar-bazqux
github-token: ${{ github.token }}
32 changes: 12 additions & 20 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import * as process from 'process';
import * as cp from 'child_process';
import * as path from 'path';
import os from 'os';

// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
process.env['ARCH'] = 'darwin';
process.env['GITHUB_REPOSITORY'] = 'quizlet/cd-infra';
process.env['INPUT_GITHUB-TOKEN'] = '500';
process.env['INPUT_ARGOCD-VERSION'] = 'v1.6.1';
process.env['INPUT_ARGOCD-SERVER-URL'] = 'argocd.qzlt.io';
process.env['INPUT_ARGOCD-TOKEN'] = 'foo';
const ip = path.join(__dirname, '..', 'lib', 'main.js');
const options: cp.ExecSyncOptions = {
env: process.env
};
console.log(cp.execSync(`node ${ip}`, options).toString());
});

afterAll(() => {
cp.execSync('rm -rf bin');
describe('main', () => {
// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', async () => {
process.env['RUNNER_TEMP'] = os.tmpdir();
process.env['GITHUB_REPOSITORY'] = 'quizlet/cd-infra';
process.env['INPUT_GITHUB-TOKEN'] = '500';
process.env['INPUT_ARGOCD-VERSION'] = 'v1.6.1';
process.env['INPUT_ARGOCD-SERVER-URL'] = 'argocd.qzlt.io';
process.env['INPUT_ARGOCD-TOKEN'] = 'foo';
expect(import('../src/main')).resolves.toBeTruthy();
});
});
Loading

0 comments on commit 89e8630

Please sign in to comment.