Skip to content

Commit

Permalink
Merge branch 'test-workflow'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Jul 25, 2022
2 parents 5813944 + bb04bac commit 3fa2929
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04
-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
-P self-hosted=ghcr.io/catthehacker/ubuntu:act-22.04
57 changes: 57 additions & 0 deletions .github/workflows/test-iamlive-action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test iamlive action
on:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check-dist:
name: Check dist
runs-on: ubuntu-22.04

permissions:
contents: read

steps:
- name: Check out code
uses: actions/[email protected]

- name: Check diff is up to date
run: |
git diff --quiet -- dist || {
echo "::error::The ./dist is outdated, run 'yarn build' and commit"
exit 1
}
utilize:
name: Use iamlive action
runs-on: ubuntu-22.04

needs: [check-dist]

permissions:
contents: read

steps:
- name: Check out code
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: '16'

- name: Setup iamlive
id: setup-iamlive
uses: ./
with:
iamlive-version: v0.48.0

- name: Check output and installPath
run: |
[ "${IAMLIVE_VERSION}" == v0.48.0 ] || { echo >&2 "::error::Expected v0.48.0 to be installed."; }
hash iamlive 2>/dev/null || { echo >&2 "iamlive can not be found in the PATH."; exit 1; }
echo "::notice::Installed iamlive ${IAMLIVE_VERSION} at $(which iamlive)"
env:
IAMLIVE_VERSION: ${{ steps.setup-iamlive.outputs.iamlive-version }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"license": "MIT",
"scripts": {
"build": "ncc build -m -s --license licenses.txt",
"build:watch": "ncc build -m -s --license licenses.txt -w"
"build:watch": "ncc build -m -s --license licenses.txt -w",
"test-run": "act"
},
"dependencies": {
"@actions/core": "^1.9.0",
Expand Down

0 comments on commit 3fa2929

Please sign in to comment.