ArkProjects.EHentai.Api net8 + fixes #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: push branches (tests) | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.nuget/packages | |
key: ${{runner.os}}-nuget | |
- name: env vars | |
env: | |
GIT_REF: ${{ github.ref_name }} | |
GIT_REF_TYPE: ${{ github.ref_type }} | |
GIT_COMMIT_SHA: ${{ github.sha }} | |
PROJECT_URL: ${{ github.server_url }}/${{ github.repository }} | |
REPO_URL: ${{ github.repositoryUrl }} | |
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
echo "GIT_REF=${GIT_REF}" >> ${GITHUB_ENV} | |
echo "GIT_REF_TYPE=${GIT_REF_TYPE}" >> ${GITHUB_ENV} | |
echo "GIT_COMMIT_SHA=${GIT_COMMIT_SHA}" >> ${GITHUB_ENV} | |
echo "GIT_COMMIT_MESSAGE=${GIT_COMMIT_MESSAGE}" >> ${GITHUB_ENV} | |
echo "PROJECT_URL=${PROJECT_URL}" >> ${GITHUB_ENV} | |
echo "REPO_URL=${REPO_URL}" >> ${GITHUB_ENV} | |
echo "PACKAGE=`echo "$GIT_COMMIT_MESSAGE" | sed -E 's|^([^ -]+).*|\1|1'`" >> ${GITHUB_ENV} | |
- name: Build | |
working-directory: ${{env.PACKAGE}} | |
run: dotnet build -c Release | |
- name: Test | |
working-directory: ${{env.PACKAGE}} | |
run: dotnet test -c Release --no-build --logger trx --results-directory "TestResults" | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dotnet-results | |
path: ${{env.PACKAGE}}/TestResults | |
if: ${{always()}} |