Ubuntu22.04 Test #50
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: Ubuntu22.04 Test | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
env: | |
fabfed_image: fabfed:cicd | |
FABRIC_TOKEN: ${{ secrets.FABRIC_TOKEN }} | |
FABRIC_BASTION_KEY: ${{ secrets.FABRIC_BASTION_KEY }} | |
FABRIC_SLIVER_KEY: ${{ secrets.FABRIC_SLIVER_KEY }} | |
FABRIC_SLIVER_PUBKEY: ${{ secrets.FABRIC_SLIVER_PUBKEY }} | |
FABRIC_PROJECT: ${{ secrets.FABRIC_PROJECT }} | |
FABRIC_USER: ${{ secrets.FABRIC_USER }} | |
SENSE_USER: ${{ secrets.SENSE_USER }} | |
SENSE_PASSWORD: ${{ secrets.SENSE_PASSWORD }} | |
SENSE_SECRET: ${{ secrets.SENSE_SECRET }} | |
SENSE_SLIVER_KEY: ${{ secrets.SENSE_SLIVER_KEY }} | |
jobs: | |
UbuntuTest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Print Versions | |
run: | | |
python3 --version | |
pip --version | |
pwd | |
whoami | |
echo ${{ github.workspace }} | |
echo $HOME | |
- name: Install Fabfed And Requirements | |
run: | | |
pip install --upgrade pip | |
pip install setuptools --upgrade | |
pip install --no-cache-dir --ignore-requires-python neo4j==5.18.0 | |
pip list -v | grep neo4j | |
pip install --no-cache-dir --ignore-requires-python -r requirements.txt | |
python3 -m pip install --no-cache-dir . | |
- name: Run Unit Tests | |
run: | | |
echo "*******************" | |
echo ${{ env.RUN_FABRIC_AWS_SENSE }} | |
echo "*******************" | |
echo ${{ env.RUN_FABRIC_AWS_SENSE == 'false' }} | |
echo "*******************" | |
echo ${{ env.RUN_FABRIC_AWS_SENSE == false }} | |
echo "*******************" | |
- name: Run Unit Tests | |
run: | | |
pytest tests | |
- name: Test Stitch Policy | |
run: | | |
fabfed stitch-policy -providers "chi,fabric" | |
- name: Show Sessions | |
run: | | |
fabfed sessions -show | |
fabfed sessions -show -json | |
- name: Save Credentials | |
run: | | |
mkdir -p ${{ github.workspace }}/creds | |
echo ${{ env.FABRIC_TOKEN }} | base64 --decode > ${{ github.workspace }}/creds/token.json | |
echo ${{ env.FABRIC_BASTION_KEY }} | base64 --decode > ${{ github.workspace }}/creds/bastion | |
echo ${{ env.FABRIC_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver | |
echo ${{ env.FABRIC_SLIVER_PUBKEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver.pub | |
echo ${{ env.SENSE_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/sense | |
- name: Test Fabric FacilityPort | |
if: ${{ env.RUN_FABRIC_AWS_SENSE == 'false' || env.RUN_FABRIC_AWS_SENSE == false }} | |
run: | | |
session=cicd-fabric-facility-port | |
echo "vlan: 3102" > $session-varfile.yml | |
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml | |
- name: Test L2VPN with nodes. | |
if: ${{ env.RUN_FABRIC_AWS_SENSE == 'false' || env.RUN_FABRIC_AWS_SENSE == false }} | |
run: | | |
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_l2_vpn cicd-fabric-l2-vpn | |
- name: Test SENSE/AWS. | |
if: ${{ env.RUN_FABRIC_AWS_SENSE == 'true' || env.RUN_FABRIC_AWS_SENSE == true }} | |
run: | | |
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_sense_aws cicd-sense-aws |