Merge pull request #285 from HicServices/release/v3.2.5 #852
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: Build and test | |
on: | |
push | |
env: | |
MSSQL_SA_PASSWORD: "YourStrong!Passw0rd" | |
ACCEPT_EULA: "Y" | |
MSSQL_PID: "developer" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
services: | |
oracle: | |
image: konnecteam/docker-oracle-12c:sequelize | |
env: | |
DB_MEMORY: 128m | |
ports: | |
- 1521:1521 | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_PASSWORD: pgpass4291 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Disable write flush for CI runs | |
run: sudo apt-get install -y libeatmydata1 apt-transport-https curl | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install Sql Server | |
run: | | |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)" | |
sudo apt-get install -y --no-install-recommends postgresql mssql-tools mssql-server | |
sudo -E /opt/mssql/bin/mssql-conf -n setup accept-eula | |
- name: MySQL | |
run: | | |
mv Tests/FAnsiTests/TestDatabases{-github,}.xml | |
sudo systemctl start mysql.service | |
- name: Test | |
run: dotnet test --logger "console;verbosity=minimal" --nologo | |
- name: Pack | |
run: | | |
dotnet pack -c Release -p:DebugType=full -p:SymbolPackageFormat=snupkg --include-symbols --nologo -p:Version=$(fgrep AssemblyInformationalVersion SharedAssemblyInfo.cs|cut -d'"' -f2) -o . | |
- name: Nuget push | |
if: contains(github.ref,'refs/tags/') | |
run: dotnet nuget push HIC.FAnsiSql.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} --skip-duplicate | |
- name: Store created nupkg files | |
uses: actions/upload-artifact@v4 | |
with: | |
path: '*.nupkg' | |
retention-days: 1 | |
- name: Upload release binaries | |
if: contains(github.ref,'refs/tags/') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: '*.nupkg' | |
file_glob: true | |
overwrite: true |