Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dev dependencies and workflow #54

Merged
merged 1 commit into from
Apr 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"node": true,
"es2021": true,
"jest/globals": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"jest",
"prettier"
]
}
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 120,
"printWidth": 240,
"tabWidth": 2,
"useTabs": false,
"semi": true,
Expand Down
1 change: 1 addition & 0 deletions __tests__/context.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, it} from '@jest/globals';
import * as context from '../src/context';

describe('getInputList', () => {
Expand Down
6 changes: 2 additions & 4 deletions __tests__/dagger.test.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import fs = require('fs');
import {describe, expect, it} from '@jest/globals';
import * as fs from 'fs';
import * as dagger from '../src/dagger';

describe('install', () => {
it('acquires latest version of Dagger', async () => {
const daggerBin = await dagger.install('latest');
console.log(daggerBin);
expect(fs.existsSync(daggerBin)).toBe(true);
}, 100000);

it('acquires latest 0.1 version', async () => {
const daggerBin = await dagger.install('0.1');
console.log(daggerBin);
expect(fs.existsSync(daggerBin)).toBe(true);
}, 100000);

it('acquires 0.1.0-alpha.9 version of Dagger', async () => {
const daggerBin = await dagger.install('0.1.0-alpha.9');
console.log(daggerBin);
expect(fs.existsSync(daggerBin)).toBe(true);
}, 100000);
});
9 changes: 5 additions & 4 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1.3-labs
ARG NODE_VERSION
# syntax=docker/dockerfile:1

ARG NODE_VERSION=12

FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache cpio findutils git
Expand Down Expand Up @@ -64,10 +65,10 @@ EOT
FROM scratch AS format-update
COPY --from=format /out /

FROM deps AS format-validate
FROM deps AS lint
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn run format-check
yarn run lint

FROM deps AS test
ENV RUNNER_TEMP=/tmp/github_runner
Expand Down
Loading