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

Bump @vercel/ncc from 0.31.1 to 0.36.0 #4

Closed
wants to merge 2 commits into from
Closed
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
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 2
ij_continuation_indent_size = 2
end_of_line = lf
max_line_length = off
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
ij_visual_guides = none
20 changes: 15 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
name: 'build-test'
on: # rebuild any PRs and main branch changes
on:
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
build: # make sure build/ci work properly
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm install
- run: |
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
android-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- uses: ./
with:
milliseconds: 1000
version: latest
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
target: google_apis
profile: Nexus 5
script: maestro test --format=junit --output=reports/test.xml --no-ansi .maestro/android-contacts.yaml
20 changes: 20 additions & 0 deletions .maestro/android-contacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: com.android.contacts
---
- launchApp
- tapOn: "Create new contact"
- runFlow:
when:
visible: "ADD ACCOUNT"
file: dismiss-dialog.yaml
- tapOn: "First name"
- inputRandomPersonName
- tapOn: "Last name"
- inputRandomPersonName
- tapOn: "Phone"
- inputRandomNumber:
length: 10
- back
- tapOn: "Cancel"
- tapOn: "Email"
- inputRandomEmail
- tapOn: "Save"
3 changes: 3 additions & 0 deletions .maestro/dismiss-dialog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
appId: com.android.contacts
---
- tapOn: "CANCEL"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The MIT License (MIT)

Copyright (c) 2018 GitHub, Inc. and contributors
Copyright (c) 2022 Artem Dorosh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 1 addition & 16 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
import {wait} from '../src/wait'
import * as process from 'process'
import * as cp from 'child_process'
import * as path from 'path'
import {expect, test} from '@jest/globals'

test('throws invalid number', async () => {
const input = parseInt('foo', 10)
await expect(wait(input)).rejects.toThrow('milliseconds not a number')
})

test('wait 500 ms', async () => {
const start = new Date()
await wait(500)
const end = new Date()
var delta = Math.abs(end.getTime() - start.getTime())
expect(delta).toBeGreaterThan(450)
})
import {test} from '@jest/globals'

// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
process.env['INPUT_MILLISECONDS'] = '500'
const np = process.execPath
const ip = path.join(__dirname, '..', 'lib', 'main.js')
const options: cp.ExecFileSyncOptions = {
Expand Down
31 changes: 24 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
name: 'Your name here'
description: 'Provide a description here'
author: 'Your name or organization here'
name: 'maestro-test-action'
description: 'Simple step to run Maestro tests with GitHub Actions'
author: 'dniHze'
inputs:
milliseconds: # change this
required: true
description: 'input description here'
default: 'default value if applicable'
flow:
required: false
description: 'Meastro flow or directory'
report:
required: false
description: 'JUnit report destination'
default: 'reports/maestro-test.xml'
env:
required: false
description: 'environment variables'
default: ''
version:
required: false
description: 'Maestro CLI version'
default: 'latest'
outputs:
report:
description: 'JUnit test report'
runs:
using: 'node16'
main: 'dist/index.js'
branding:
color: purple
icon: check-circle
Loading