fix: Add docker-compose to PATH (#274)

* Expose command as `docker-compose`

* Format and package
This commit is contained in:
Tibo Delor
2021-09-01 12:29:50 +10:00
committed by GitHub
parent f73439ca62
commit ecd3566c81
4 changed files with 27 additions and 6 deletions

View File

@@ -1,7 +1,21 @@
import {runCommand} from '../src/install'
import {install, runCommand} from '../src/install'
import * as core from '@actions/core'
import {expect, test} from '@jest/globals'
test('runCommand', async () => {
const result = await runCommand('echo foo bar')
expect(result).toBe('foo bar')
})
async function testVersion(version: string) {
const commandPath = await install(version)
core.addPath(commandPath)
const result = await runCommand('docker-compose version')
expect(result).toContain(version)
}
test('Install the right version', async () => {
await testVersion('1.29.1')
await testVersion('1.29.2')
})