removed unused; added temp dir

This commit is contained in:
Alif Rachmawadi
2019-08-13 17:23:34 +07:00
parent 3aa0d2f642
commit d55858e687
2 changed files with 4 additions and 4 deletions

View File

@@ -3,19 +3,23 @@ import fs = require('fs');
import path = require('path');
const toolDir = path.join(__dirname, 'runner', 'tools');
const tempDir = path.join(__dirname, 'runner', 'temp');
process.env['RUNNER_TOOL_CACHE'] = toolDir;
process.env['RUNNER_TEMP'] = tempDir;
import * as installer from '../src/installer';
describe('installer tests', () => {
beforeAll(async () => {
await io.rmRF(toolDir);
await io.rmRF(tempDir);
}, 300000);
afterAll(async () => {
try {
await io.rmRF(toolDir);
await io.rmRF(tempDir);
} catch {
console.log('Failed to remove test directories');
}

View File

@@ -1,6 +1,5 @@
import * as core from '@actions/core';
import * as installer from './installer';
import * as path from 'path';
async function run() {
try {
@@ -8,9 +7,6 @@ async function run() {
const channel = core.getInput('channel', {required: false}) || 'stable';
await installer.getFlutter(version, channel);
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'flutter.json')}`);
} catch (error) {
core.setFailed(error.message);
}