Skip to content

[TOREMOVE] Test CI

[TOREMOVE] Test CI #31

Workflow file for this run

name: Validate
on:
push:
branches: [ test-ci ]
pull_request:
types: [ assigned, opened, reopened, synchronize, ready_for_review ]
workflow_call:
outputs:
release-type:
description: The release type from changelog
value: ${{ jobs.check-version-and-changelog.outputs.release-type }}
jobs:
build:
uses: "./.github/workflows/build.yml"
lint-files:
runs-on: ubuntu-22.04
needs: [ build ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9.12
- name: Restore build
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}
- run: make check-syntax-errors
- run: make check-style
- name: Lint Python files
run: "${GITHUB_WORKSPACE}/.github/lint-files.sh '*.py' 'flake8'"
- name: Lint YAML tests
run: "${GITHUB_WORKSPACE}/.github/lint-files.sh 'tests/*.yaml' 'yamllint'"
test-yaml:
runs-on: ubuntu-22.04
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9.12
- name: Restore build
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}
- run: make test
test-api:
runs-on: ubuntu-22.04
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9.12
- name: Restore build
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}
- name: Test the Web API
run: "${GITHUB_WORKSPACE}/.github/test-api.sh"
check-version-and-changelog:
runs-on: ubuntu-22.04
outputs:
release-type: ${{ steps.validate-changelog.outputs.release-type }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Validate changelog
id: validate-changelog
uses: OpenTermsArchive/manage-changelog/validate@v0.3.0
- name: Check version number has been properly updated
run: "${GITHUB_WORKSPACE}/.github/is-version-number-acceptable.sh"