Add support for sensor coordinates table #49
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
# This workflow tests and releases a new version of the package. | |
name: release | |
# Only trigger when a pull request into main branch is closed. | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
# CI should already be done but running tests on main is required for codecov and badges to have a base | |
run-tests: | |
if: "github.event.pull_request.merged == true" | |
runs-on: ${{ matrix.os }} | |
env: | |
USING_COVERAGE: "3.9" | |
strategy: | |
matrix: | |
python: [3.9] | |
os: [ubuntu-latest, windows-latest] | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Poetry | |
uses: snok/[email protected] | |
- name: Check pyproject.toml file | |
run: poetry check | |
- name: Get package version | |
id: get-package-version | |
run: echo "PACKAGE_VERSION=$(poetry version -s)" >> $GITHUB_OUTPUT | |
- name: Install tox | |
run: pip install tox | |
- name: Authenticate with Google Cloud | |
id: auth | |
uses: google-github-actions/[email protected] | |
with: | |
# NOTE: If setting create_credentials_file=true, .dockerignore file must include `gha-creds-*.json` to avoid baking these credentials into build | |
create_credentials_file: true | |
workload_identity_provider: "projects/885434704038/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider" | |
service_account: "[email protected]" | |
- name: Run tests | |
env: | |
GOOGLE_CLOUD_PROJECT: ${{ secrets.TEST_PROJECT_NAME }} | |
run: tox | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: coverage.xml | |
fail_ci_if_error: false | |
token: ${{ secrets.CODECOV_TOKEN }} | |
outputs: | |
package_version: ${{ steps.get-package-version.outputs.PACKAGE_VERSION }} | |
release: | |
runs-on: ubuntu-latest | |
needs: run-tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own. | |
with: | |
tag_name: ${{ needs.run-tests.outputs.package_version }} | |
release_name: ${{ github.event.pull_request.title }} | |
body: ${{ github.event.pull_request.body }} | |
draft: false | |
prerelease: false |