Skip to content

Commit

Permalink
Ship with @zeit/ncc
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Nov 23, 2019
1 parent 3f6c88d commit 1db0b06
Show file tree
Hide file tree
Showing 37 changed files with 2,628 additions and 3,004 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Expand Up @@ -65,7 +65,7 @@ jobs:
run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }}

- name: Setup PHP with extensions and custom config
run: node lib/install.js
run: node dist/index.js
env:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug, pcov #optional
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,6 +1,7 @@
# Explicitly not ignoring node_modules so that they are included in package downloaded by runner
!node_modules/
node_modules/
__tests__/runner/*
lib/

# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
Expand Down
17 changes: 17 additions & 0 deletions __tests__/utils.test.ts
Expand Up @@ -26,6 +26,23 @@ describe('Utils tests', () => {
expect(await utils.getInput('DoesNotExist', false)).toBe('');
});

it('checking getVersion', async () => {
process.env['php-version'] = '7.3';
expect(await utils.getVersion()).toBe('7.3');
process.env['php-version'] = '7.4';
expect(await utils.getVersion()).toBe('7.4');
process.env['php-version'] = '8.0';
expect(await utils.getVersion()).toBe('7.4');
process.env['php-version'] = '8.0-dev';
expect(await utils.getVersion()).toBe('7.4');
process.env['php-version'] = '7.4nightly';
expect(await utils.getVersion()).toBe('7.4');
process.env['php-version'] = '7.4snapshot';
expect(await utils.getVersion()).toBe('7.4');
process.env['php-version'] = 'nightly';
expect(await utils.getVersion()).toBe('7.4');
});

it('checking asyncForEach', async () => {
const array: Array<string> = ['a', 'b', 'c'];
let concat = '';
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -21,4 +21,4 @@ inputs:
required: false
runs:
using: 'node12'
main: 'lib/install.js'
main: 'dist/index.js'

0 comments on commit 1db0b06

Please sign in to comment.