fix: remove caching in the user info endpoint in the backend #153
Workflow file for this run
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: API | |
on: | |
repository_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Restore | |
run: dotnet restore ./src/Chemcom.sln | |
- name: Build | |
run: dotnet build ./src/Chemcom.sln --configuration Release --no-restore | |
test: | |
needs: build | |
runs-on: ubuntu-latest # Default runner | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Set Docker Image Based on OS | |
id: set-image | |
run: | | |
if [[ "$(uname -s)" == "Linux" ]]; then | |
echo "image=mcr.microsoft.com/mssql/server:2022-latest" >> $GITHUB_ENV | |
else | |
echo "image=mcr.microsoft.com/mssql/server:2019-latest" >> $GITHUB_ENV | |
fi | |
- name: Start Docker container | |
run: | | |
echo "Using Docker image: ${{ env.image }}" | |
docker run -d --name test-container ${{ env.image }} | |
docker ps -a | |
- name: Test | |
run: dotnet test ./src/IntegrationTests | |
- name: Get Docker container logs | |
run: docker logs test-container | |
- name: Cleanup Docker containers | |
run: docker rm -f $(docker ps -a -q) |