Skip to content

Commit

Permalink
Merge pull request #54 from crazy-max/update-dev
Browse files Browse the repository at this point in the history
chore: update dev dependencies and workflow
  • Loading branch information
crazy-max authored Apr 23, 2022
2 parents 2e6b230 + 85d3380 commit 79e4c3d
Show file tree
Hide file tree
Showing 16 changed files with 1,787 additions and 7,541 deletions.
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

0 comments on commit 79e4c3d

Please sign in to comment.