Skip to content

Support passing versions via build.psd1 #52

Support passing versions via build.psd1

Support passing versions via build.psd1 #52

Workflow file for this run

name: CI
on:
push: {}
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: earthly +test
if: github.ref != 'refs/heads/main'
run: earthly --strict +test
- name: earthly +push
if: github.ref == 'refs/heads/main'
run: earthly --push --secret NUGET_API_KEY --secret PSGALLERY_API_KEY --strict +all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
- uses: actions/upload-artifact@v4
with:
name: ModuleBuilder
path: Modules/ModuleBuilder
- uses: actions/upload-artifact@v4
with:
name: TestResults
path: Modules/ModuleBuilder-TestResults
- uses: actions/upload-artifact@v4
with:
name: Packages
path: Modules/ModuleBuilder-Packages
- name: Upload Tests
uses: actions/upload-artifact@v4
with:
name: PesterTests
path: ${{github.workspace}}/Tests
- name: Upload RequiredModules.psd1
uses: actions/upload-artifact@v4
with:
name: RequiredModules
path: ${{github.workspace}}/RequiredModules.psd1
test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: ModuleBuilder
path: Modules/ModuleBuilder
- name: Download Pester Tests
uses: actions/download-artifact@v4
with:
name: PesterTests
path: PesterTests
- name: Download RequiredModules
uses: actions/download-artifact@v4
with:
name: RequiredModules
- uses: PoshCode/Actions/install-requiredmodules@v1
- uses: PoshCode/Actions/pester@v1
with:
codeCoveragePath: Modules/ModuleBuilder
moduleUnderTest: ModuleBuilder
additionalModulePaths: ${{github.workspace}}/Modules
- name: Publish Test Results
uses: zyborg/dotnet-tests-report@v1
with:
test_results_path: results.xml
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: Pester Results
path: ${{github.workspace}}/*.xml