Don't run tests against PRs

pull/709/head^2
Tyrrrz 3 years ago
parent acfe102e7f
commit b64dff1eab

@ -14,16 +14,17 @@ jobs:
uses: actions/checkout@v2.3.3
- name: Get release version
id: get-version
id: get_version
uses: dawidd6/action-get-tag@v1
- name: Login
run: docker login -u tyrrrz -p ${{ secrets.DOCKER_TOKEN }}
- name: Build
run: docker build -t tyrrrz/discordchatexporter:${{ steps.get-version.outputs.tag }} -t tyrrrz/discordchatexporter:stable .
run: docker build -t tyrrrz/discordchatexporter:${{ steps.get_version.outputs.tag }} -t tyrrrz/discordchatexporter:stable .
- name: Deploy
run: |
docker push tyrrrz/discordchatexporter:${{ steps.get-version.outputs.tag }}
docker push tyrrrz/discordchatexporter:stable
- name: Deploy (version)
run: docker push tyrrrz/discordchatexporter:${{ steps.get_version.outputs.tag }}
- name: Deploy (stable)
run: docker push tyrrrz/discordchatexporter:stable

@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v2.3.3
- name: Get release version
id: get-version
id: get_version
uses: dawidd6/action-get-tag@v1
- name: Install .NET (v3.1)
@ -85,5 +85,5 @@ jobs:
}
payload: |
{
"content": "**DiscordChatExporter** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/DiscordChatExporter/blob/${{ steps.get-version.outputs.tag }}/Changelog.md>"
"content": "**DiscordChatExporter** new version released!\nVersion: `${{ steps.get_version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/DiscordChatExporter/blob/${{ steps.get_version.outputs.tag }}/Changelog.md>"
}

@ -19,5 +19,5 @@ jobs:
- name: Build
run: docker build -t tyrrrz/discordchatexporter:latest .
- name: Deploy
- name: Deploy (latest)
run: docker push tyrrrz/discordchatexporter:latest

@ -21,6 +21,8 @@ jobs:
dotnet-version: 5.0.x
- name: Build & test
# Tests need access to secrets, so we can't run them against PRs because of limited trust
if: ${{ github.event_name != 'pull_request' }}
run: dotnet test --configuration Release --logger GitHubActions
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}

@ -10,8 +10,5 @@ In order to run these tests locally, you need to join the test server and config
- **Using an environment variable**: set `DISCORD_TOKEN` variable to your token
4. Run the tests: `dotnet test`
> If you're submitting a pull request, you don't _have_ to run the tests locally -- they are executed automatically by CI.
Running them locally can still sometimes be useful for debugging purposes though.
> If you want to have a new test case or a scenario added, please let me know in your pull request.
Currently, it's not possible to add them by yourself.
Loading…
Cancel
Save