Skip to content
Open
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
50 changes: 28 additions & 22 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Testing Script
#
name: Tests CI
on: push
branches: [ master ]
on: [ push ]
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -10,24 +12,28 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: '12'
- run: yarn install
- run: yarn test:ci
- name: Tests ✅
if: ${{ success() }}
run: |
curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{
"context": "tests",
"state": "success",
"description": "Tests passed",
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'
- name: Tests 🚨
if: ${{ failure() }}
run: |
curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{
"context": "tests",
"state": "failure",
"description": "Tests failed",
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'
-run: npm ci
-run: npm test
-run: npm run build


# - run: yarn install
# - run: yarn test:ci
# - name: Tests ✅
# if: ${{ success() }}
# run: |
# curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{
# "context": "tests",
# "state": "success",
# "description": "Tests passed",
# "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
# }'
# - name: Tests 🚨
# if: ${{ failure() }}
# run: |
# curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{
# "context": "tests",
# "state": "failure",
# "description": "Tests failed",
# "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
# }'