diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 250c21f..061f88f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: node-version: [12.x] - platform: [ubuntu-latest] #[ubuntu-latest, windows-latest, macos-latest] + platform: [ubuntu-latest, windows-latest, macos-latest] # Build OS runs-on: ${{ matrix.platform }} # CI @@ -25,32 +25,45 @@ jobs: run: npm i # create a config file - name: Create Config File - uses: "finnp/create-file-action@master" - env: - FILE_NAME: "config.json" - FILE_DATA: '{"BITLY_TOKEN": "${{ secrets.BITLY_TOKEN }}","TWITCH_TOKEN": "${{ secrets.TWITCH_TOKEN }}","DISCORD_TOKEN": "${{ secrets.DISCORD_TOKEN }}"}' + uses: "DamianReeves/write-file-action@v1.0" + with: + path: ./config.json + contents: '{"BITLY_TOKEN": "${{ secrets.BITLY_TOKEN }}","TWITCH_TOKEN": "${{ secrets.TWITCH_TOKEN }}","DISCORD_TOKEN": "${{ secrets.DISCORD_TOKEN }}"}' + write-mode: overwrite # run tests - name: Run tests run: npm run test:ci # conditions with test fails or succeeds - name: Tests ✅ + shell: bash 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 }}" - }' + curl \ + -X POST \ + -H 'Accept: application/vnd.github.v3+json' \ + -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + -d '{ + "context": "tests", + "state": "success", + "description": "Tests passed", + "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + }' \ + https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} - name: Tests 🚨 if: ${{ failure() }} + shell: bash 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 }}" - }' + curl \ + -X POST \ + -H 'Accept: application/vnd.github.v3+json' \ + -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + -d '{ + "context": "tests", + "state": "failure", + "description": "Tests failed", + "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + }' \ + https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} # Code Coverage - name: Code Coverage uses: codecov/codecov-action@v1 diff --git a/package.json b/package.json index ced7db4..6fa8ca8 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ }, "author": "", "license": "ISC", + "resolutions": { + "**/**/fsevents": "^1.2.9" + }, "dependencies": { "@discordjs/opus": "^0.3.3", "axios": ">=0.21.1",